Add ResultHash to header

This commit is contained in:
Ethan Frey
2017-12-22 16:43:45 +01:00
committed by Ethan Buchman
parent 632cc918b4
commit 58c5df729b
12 changed files with 44 additions and 21 deletions

View File

@ -67,6 +67,12 @@ func TestValidateBlock(t *testing.T) {
block.ConsensusHash = []byte("wrong consensus hash")
err = state.ValidateBlock(block)
require.Error(t, err)
// wrong results hash fails
block = makeBlock(state, 1)
block.ResultsHash = []byte("wrong results hash")
err = state.ValidateBlock(block)
require.Error(t, err)
}
func TestApplyBlock(t *testing.T) {