diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-09 13:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 84d04454db640bc730445be3ec536d4100ae6ec1 (patch) | |
tree | 9e23acdd738c9de4f5fb8b800187932b501476ee /internal/ethapi | |
parent | 947a2b720d966efae8aa8564cbe948f8eb6d5d38 (diff) | |
download | dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.gz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.bz2 dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.lz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.xz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.zst dexon-84d04454db640bc730445be3ec536d4100ae6ec1.zip |
app: add cache mechanism to increase performance
Diffstat (limited to 'internal/ethapi')
-rw-r--r-- | internal/ethapi/api.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index bd76d5e79..e43b672f7 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 { |