don't cache the block/header hashes. fixes a cache invalidation bug

This commit is contained in:
Jae Kwon
2015-01-19 14:08:53 -08:00
parent b7b88cd763
commit 6c48642ff9
2 changed files with 23 additions and 30 deletions

View File

@ -635,7 +635,11 @@ func (cs *ConsensusState) RunActionPropose(height uint, round uint) {
}
// Set the blk.Header.StateHash.
cs.state.SetBlockStateHash(block)
err := cs.state.SetBlockStateHash(block)
if err != nil {
log.Error("Error setting state hash", "error", err)
return
}
blockParts = blk.NewPartSetFromData(binary.BinaryBytes(block))
pol = cs.LockedPOL // If exists, is a PoUnlock.