mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 17:51:39 +00:00
Remove ConsensusParams.TxSize and ConsensusParams.BlockGossip (#2364)
* remove ConsensusParams.TxSize and ConsensusParams.BlockGossip Refs #2347 * block part size is now fixed Refs #2347 * use max data size, not max bytes for tx limit Refs #2347
This commit is contained in:
committed by
Ethan Buchman
parent
33b4617e9a
commit
0e1cd88863
@ -145,8 +145,11 @@ func (blockExec *BlockExecutor) Commit(state State, block *types.Block) ([]byte,
|
||||
"appHash", fmt.Sprintf("%X", res.Data))
|
||||
|
||||
// Update mempool.
|
||||
maxBytes := state.ConsensusParams.TxSize.MaxBytes
|
||||
filter := func(tx types.Tx) bool { return len(tx) <= maxBytes }
|
||||
maxDataBytes := types.MaxDataBytesUnknownEvidence(
|
||||
state.ConsensusParams.BlockSize.MaxBytes,
|
||||
state.Validators.Size(),
|
||||
)
|
||||
filter := func(tx types.Tx) bool { return len(tx) <= maxDataBytes }
|
||||
if err := blockExec.mempool.Update(block.Height, block.Txs, filter); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user