Skip to content

Commit

Permalink
Bugfix: EstimateGas should use latest block
Browse files Browse the repository at this point in the history
  • Loading branch information
jdowning100 committed Jun 20, 2023
1 parent 4f1c3da commit 90497f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/quaiapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args TransactionA
if nodeCtx != common.ZONE_CTX {
return 0, errors.New("estimateGas can only be called in zone chain")
}
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
if blockNrOrHash != nil {
bNrOrHash = *blockNrOrHash
}
Expand Down

0 comments on commit 90497f3

Please sign in to comment.