core, eth, trie: reuse trie journals in all our code

This commit is contained in:
Péter Szilágyi
2016-09-27 13:13:13 +03:00
parent cd791bd855
commit 710435b51b
9 changed files with 151 additions and 25 deletions

View File

@ -81,7 +81,7 @@ func (b *EthApiBackend) StateAndHeaderByNumber(blockNr rpc.BlockNumber) (ethapi.
if header == nil {
return nil, nil, nil
}
stateDb, err := state.New(header.Root, b.eth.chainDb)
stateDb, err := b.eth.BlockChain().StateAt(header.Root)
return EthApiState{stateDb}, header, err
}