diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-09 13:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:52 +0800 |
commit | 7c1386d928acd050684f435e49149696bcc0a637 (patch) | |
tree | db7141013bd1aa9e2349aa8b161d6529ff25cd40 /internal | |
parent | d44a8b7003df87c7e7662a7ac86fb351872cd371 (diff) | |
download | dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.gz dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.zst dexon-7c1386d928acd050684f435e49149696bcc0a637.zip |
app: add cache mechanism to increase performance
Diffstat (limited to 'internal')
-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 f8af995f4..93906f35f 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -769,7 +769,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 } @@ -897,6 +897,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 { |