From e26476f639a51f1c48447b2274e103f88ea86299 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 14 Mar 2026 12:22:13 +0100 Subject: [PATCH] chore(tm2): remove resolved TODO comments in state/store.go Remove 4 'TODO: ensure that buf is completely read' comments from loadState, LoadABCIResponses, loadValidatorsInfo, and loadConsensusParamsInfo. These are already handled by amino.Unmarshal's reflection path which checks n != len(bz) after decoding. --- tm2/pkg/bft/state/store.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tm2/pkg/bft/state/store.go b/tm2/pkg/bft/state/store.go index 9fb34279e5e..938f9e25712 100644 --- a/tm2/pkg/bft/state/store.go +++ b/tm2/pkg/bft/state/store.go @@ -94,7 +94,6 @@ func loadState(db dbm.DB, key []byte) (state State) { osm.Exit(fmt.Sprintf(`LoadState: Data has been corrupted or its spec has changed: %v\n`, err)) } - // TODO: ensure that buf is completely read. return state } @@ -178,7 +177,6 @@ func LoadABCIResponses(db dbm.DB, height int64) (*ABCIResponses, error) { osm.Exit(fmt.Sprintf(`LoadABCIResponses: Data has been corrupted or its spec has changed: %v\n`, err)) } - // TODO: ensure that buf is completely read. return abciResponses, nil } @@ -294,7 +292,6 @@ func loadValidatorsInfo(db dbm.DB, height int64) *ValidatorsInfo { osm.Exit(fmt.Sprintf(`LoadValidators: Data has been corrupted or its spec has changed: %v\n`, err)) } - // TODO: ensure that buf is completely read. return v } @@ -374,7 +371,6 @@ func loadConsensusParamsInfo(db dbm.DB, height int64) *ConsensusParamsInfo { osm.Exit(fmt.Sprintf(`LoadConsensusParams: Data has been corrupted or its spec has changed: %v\n`, err)) } - // TODO: ensure that buf is completely read. return paramsInfo }