aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:17 +0800
commit3f320c9048198d14bc44413861efcbc5665324b1 (patch)
treed0ae47cd428ba4fa21546efcd1ac4ab50933d600 /internal
parente0c84599b660438d34972ceb494d36f83c26d430 (diff)
downloadgo-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.gz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.bz2
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.lz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.xz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.zst
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.zip
app: add cache mechanism to increase performance
Diffstat (limited to 'internal')
-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 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 {