stateroot: move state-root related logic to core/stateroot

This commit is contained in:
Evgeniy Stratonikov 2021-01-29 17:33:24 +03:00
parent 7a176727ca
commit bf20db09e0
19 changed files with 245 additions and 382 deletions

View file

@ -175,7 +175,7 @@ func newBlock(bc *core.Blockchain, lastBlock *block.Block, script []byte, txs ..
Transactions: txs,
}
if bc.GetConfig().StateRootInHeader {
sr, err := bc.GetStateRoot(bc.BlockHeight())
sr, err := bc.GetStateModule().GetStateRoot(bc.BlockHeight())
if err != nil {
return nil, err
}