mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
types: refactor PB2TM.ConsensusParams to take BlockTimeIota as an arg (#3442)
See https://github.com/tendermint/tendermint/pull/3403/files#r266208947 In #3403 we unexposed BlockTimeIota from the ABCI, but it's still part of the ConsensusParams struct, so we have to remember to add it back after calling PB2TM.ConsensusParams. Instead, PB2TM.ConsensusParams should take it as an argument Fixes #3432
This commit is contained in:
@ -64,9 +64,7 @@ func TestABCIValidators(t *testing.T) {
|
||||
func TestABCIConsensusParams(t *testing.T) {
|
||||
cp := DefaultConsensusParams()
|
||||
abciCP := TM2PB.ConsensusParams(cp)
|
||||
cp2 := PB2TM.ConsensusParams(abciCP)
|
||||
// TimeIotaMs is not exposed to the application.
|
||||
cp2.Block.TimeIotaMs = cp.Block.TimeIotaMs
|
||||
cp2 := PB2TM.ConsensusParams(abciCP, cp.Block.TimeIotaMs)
|
||||
|
||||
assert.Equal(t, *cp, cp2)
|
||||
}
|
||||
|
Reference in New Issue
Block a user