consensus/state is 2-step asynchronous

This commit is contained in:
Jae Kwon
2015-06-05 14:15:40 -07:00
parent 1b95c09160
commit 01b5540ffe
16 changed files with 706 additions and 1467 deletions

View File

@ -130,7 +130,7 @@ func (s *State) Hash() []byte {
}
// Mutates the block in place and updates it with new state hash.
func (s *State) SetBlockStateHash(block *types.Block) error {
func (s *State) ComputeBlockStateHash(block *types.Block) error {
sCopy := s.Copy()
// sCopy has no event cache in it, so this won't fire events
err := execBlock(sCopy, block, types.PartSetHeader{})