From c9d3d47de42a13a69a6715b32f5cab52ec0e31b9 Mon Sep 17 00:00:00 2001 From: gop Date: Fri, 4 Oct 2024 15:00:12 -0500 Subject: [PATCH] bugfix: return the pool gas price by default on the node --- internal/quaiapi/quai_api.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/quaiapi/quai_api.go b/internal/quaiapi/quai_api.go index ff6445ade..4adbabbf3 100644 --- a/internal/quaiapi/quai_api.go +++ b/internal/quaiapi/quai_api.go @@ -31,7 +31,6 @@ import ( "github.com/dominant-strategies/go-quai/crypto" "github.com/dominant-strategies/go-quai/log" "github.com/dominant-strategies/go-quai/metrics_config" - "github.com/dominant-strategies/go-quai/params" "github.com/dominant-strategies/go-quai/rpc" "github.com/dominant-strategies/go-quai/trie" "google.golang.org/protobuf/proto" @@ -55,11 +54,7 @@ func NewPublicQuaiAPI(b Backend) *PublicQuaiAPI { // GasPrice returns a suggestion for a gas price for legacy transactions. func (s *PublicQuaiAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) { - gasPrice := big.NewInt(int64(params.TxGas)) - if head := s.b.CurrentHeader(); head.BaseFee() != nil { - gasPrice = new(big.Int).Set(head.BaseFee()) - } - return (*hexutil.Big)(gasPrice), nil + return (*hexutil.Big)(s.b.GetPoolGasPrice()), nil } // MinerTip returns the gas price of the pool