miner: use proper state.Commit function

This commit is contained in:
Jeffrey Wilcke 2016-10-04 12:02:52 +02:00
parent a80800f56b
commit c89452c0e1

View file

@ -276,7 +276,7 @@ func (self *worker) wait() {
}
go self.mux.Post(core.NewMinedBlockEvent{Block: block})
} else {
work.state.Commit()
state.Commit(work.state)
parent := self.chain.GetBlock(block.ParentHash(), block.NumberU64()-1)
if parent == nil {
glog.V(logger.Error).Infoln("Invalid block found during mining")