Allow for test apps to return nil hashes

This commit is contained in:
Jae Kwon 2015-12-04 00:59:02 -08:00
parent e5b9a5e849
commit 35abb4df92
1 changed files with 3 additions and 0 deletions

View File

@ -192,6 +192,9 @@ func TestBadProposal(t *testing.T) {
// make the block bad by tampering with statehash
stateHash := propBlock.AppHash
if len(stateHash) == 0 {
stateHash = make([]byte, 32)
}
stateHash[0] = byte((stateHash[0] + 1) % 255)
propBlock.AppHash = stateHash
propBlockParts := propBlock.MakePartSet()