(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestMempoolConfigValidateBasic(t *testing.T) { |
| 106 | cfg := TestMempoolConfig() |
| 107 | assert.NoError(t, cfg.ValidateBasic()) |
| 108 | |
| 109 | fieldsToTest := []string{ |
| 110 | "Size", |
| 111 | "MaxTxsBytes", |
| 112 | "CacheSize", |
| 113 | "MaxTxBytes", |
| 114 | } |
| 115 | |
| 116 | for _, fieldName := range fieldsToTest { |
| 117 | reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(-1) |
| 118 | assert.Error(t, cfg.ValidateBasic()) |
| 119 | reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(0) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestStateSyncConfigValidateBasic(t *testing.T) { |
| 124 | cfg := TestStateSyncConfig() |
nothing calls this directly
no test coverage detected
searching dependent graphs…