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

@ -454,6 +454,8 @@ type CallArgs struct {
}
func (s *PublicBlockChainAPI) doCall(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (string, *big.Int, error) {
defer func(start time.Time) { glog.V(logger.Debug).Infof("call took %v", time.Since(start)) }(time.Now())
state, header, err := s.b.StateAndHeaderByNumber(blockNr)
if state == nil || err != nil {
return "0x", common.Big0, err