Skip to content

Commit

Permalink
bugfix: return the pool gas price by default on the node
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Oct 4, 2024
1 parent 365b69a commit 3880468
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/quaiapi/quai_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 3880468

Please sign in to comment.