aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commit2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c (patch)
tree9969c7cb97a1d0b07671e0ce161e1437eb06f979 /internal/ethapi
parent72d5692ead48a75e82182a42dd4443b2288491d2 (diff)
downloaddexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.gz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.bz2
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.lz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.xz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.zst
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.zip
app: add cache mechanism to increase performance
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/api.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index 12a8316b7..0f93071b7 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -765,7 +765,7 @@ func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs) (h
hi = uint64(args.Gas)
} else {
// Retrieve the current pending block to act as the gas ceiling
- block, err := s.b.BlockByNumber(ctx, rpc.PendingBlockNumber)
+ block, err := s.b.BlockByNumber(ctx, rpc.LatestBlockNumber)
if err != nil {
return 0, err
}
@@ -888,6 +888,7 @@ func RPCMarshalBlock(b *types.Block, inclTx bool, fullTx bool) (map[string]inter
"randomness": hexutil.Bytes(head.Randomness),
"round": hexutil.Uint64(head.Round),
"dexconMeta": hexutil.Bytes(head.DexconMeta),
+ "blockReward": (*hexutil.Big)(head.BlockReward),
}
if inclTx {