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

Method ValidateBasic

config/config.go:925–946  ·  view source on GitHub ↗

ValidateBasic performs basic validation (checking param bounds, etc.) and returns an error if any check fails.

()

Source from the content-addressed store, hash-verified

923// ValidateBasic performs basic validation (checking param bounds, etc.) and
924// returns an error if any check fails.
925func (cfg *MempoolConfig) ValidateBasic() error {
926 if cfg.Size < 0 {
927 return errors.New("size can't be negative")
928 }
929 if cfg.MaxTxsBytes < 0 {
930 return errors.New("max-txs-bytes can't be negative")
931 }
932 if cfg.CacheSize < 0 {
933 return errors.New("cache-size can't be negative")
934 }
935 if cfg.MaxTxBytes < 0 {
936 return errors.New("max-tx-bytes can't be negative")
937 }
938 if cfg.TTLDuration < 0 {
939 return errors.New("ttl-duration can't be negative")
940 }
941 if cfg.TTLNumBlocks < 0 {
942 return errors.New("ttl-num-blocks can't be negative")
943 }
944
945 return nil
946}
947
948//-----------------------------------------------------------------------------
949// StateSyncConfig

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected