MCPcopy Create free account
hub / github.com/tendermint/tendermint / TestMempoolConfigValidateBasic

Function TestMempoolConfigValidateBasic

config/config_test.go:105–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

103}
104
105func 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
123func TestStateSyncConfigValidateBasic(t *testing.T) {
124 cfg := TestStateSyncConfig()

Callers

nothing calls this directly

Calls 3

TestMempoolConfigFunction · 0.85
ValidateBasicMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…