fix consensus tests

This commit is contained in:
Ethan Buchman
2015-12-13 14:56:05 -05:00
parent 07a96a703e
commit 9dea9539b4
4 changed files with 383 additions and 497 deletions

View File

@ -62,8 +62,12 @@ func (b *Block) ValidateBasic(chainID string, lastBlockHeight int, lastBlockHash
}
func (b *Block) FillHeader() {
b.LastValidationHash = b.LastValidation.Hash()
b.DataHash = b.Data.Hash()
if b.LastValidationHash == nil {
b.LastValidationHash = b.LastValidation.Hash()
}
if b.DataHash == nil {
b.DataHash = b.Data.Hash()
}
}
// Computes and returns the block hash.