validate block.ValidatorsHash

This commit is contained in:
Ethan Buchman
2017-12-26 20:00:45 -05:00
parent 051c2701ab
commit bfcb40bf6b
2 changed files with 16 additions and 4 deletions

View File

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