Store LastConsensusHash in State as well

Update all BlockValidation that it matches the last state
This commit is contained in:
Ethan Frey
2017-12-19 12:28:08 -05:00
committed by Ethan Buchman
parent 45bc106de7
commit 960b25408f
6 changed files with 9 additions and 8 deletions
-4
View File
@@ -92,10 +92,6 @@ func (b *Block) ValidateBasic(chainID string, lastBlockHeight int64,
if !bytes.Equal(b.AppHash, appHash) {
return errors.New(cmn.Fmt("Wrong Block.Header.AppHash. Expected %X, got %v", appHash, b.AppHash))
}
// TODO: make testing easier
if len(consensusHash) == 0 {
panic("food")
}
if !bytes.Equal(b.ConsensusHash, consensusHash) {
return errors.New(cmn.Fmt("Wrong Block.Header.ConsensusHash. Expected %X, got %v", consensusHash, b.ConsensusHash))
}