mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-04 07:01:40 +00:00
Allow for test apps to return nil hashes
This commit is contained in:
@ -192,6 +192,9 @@ func TestBadProposal(t *testing.T) {
|
|||||||
|
|
||||||
// make the block bad by tampering with statehash
|
// make the block bad by tampering with statehash
|
||||||
stateHash := propBlock.AppHash
|
stateHash := propBlock.AppHash
|
||||||
|
if len(stateHash) == 0 {
|
||||||
|
stateHash = make([]byte, 32)
|
||||||
|
}
|
||||||
stateHash[0] = byte((stateHash[0] + 1) % 255)
|
stateHash[0] = byte((stateHash[0] + 1) % 255)
|
||||||
propBlock.AppHash = stateHash
|
propBlock.AppHash = stateHash
|
||||||
propBlockParts := propBlock.MakePartSet()
|
propBlockParts := propBlock.MakePartSet()
|
||||||
|
Reference in New Issue
Block a user