mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
strip extensions in blocksync
This commit is contained in:
@@ -560,6 +560,8 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
|
||||
if err == nil && state.ConsensusParams.ABCI.VoteExtensionsEnabled(extCommit.Height) {
|
||||
// if vote extensions were required at this height, ensure they exist.
|
||||
err = extCommit.EnsureExtensions()
|
||||
} else if err == nil && !state.ConsensusParams.ABCI.VoteExtensionsEnabled(extCommit.Height) {
|
||||
extCommit.StripExtensions()
|
||||
}
|
||||
// If either of the checks failed we log the error and request for a new block
|
||||
// at that height
|
||||
|
||||
@@ -155,7 +155,7 @@ func (rts *reactorTestSuite) addNode(
|
||||
for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ {
|
||||
lastExtCommit = seenExtCommit.Clone()
|
||||
|
||||
thisBlock := sf.MakeBlock(state, blockHeight, lastExtCommit.StripExtensions())
|
||||
thisBlock := sf.MakeBlock(state, blockHeight, lastExtCommit.ToCommit())
|
||||
thisParts, err := thisBlock.MakePartSet(types.BlockPartSizeBytes)
|
||||
require.NoError(t, err)
|
||||
blockID := types.BlockID{Hash: thisBlock.Hash(), PartSetHeader: thisParts.Header()}
|
||||
|
||||
Reference in New Issue
Block a user