From 787a5cbf7d73a002e94d3773a2cba4a64f8149db Mon Sep 17 00:00:00 2001 From: Bojie Wu Date: Tue, 9 Oct 2018 13:28:45 +0800 Subject: app: add cache mechanism to increase performance --- internal/ethapi/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal') 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 { -- cgit v1.2.3