Merge remote-tracking branch 'origin/consensus_refactor' into consensus_refactor_jae

This commit is contained in:
Jae Kwon
2015-12-14 09:33:11 -08:00
12 changed files with 650 additions and 754 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.