go-ethereum/cmd
Daniel Liu 1a9935625f
cmd/XDC: fix txpool gasPrice being overridden at checkpoints (#1878)
This commit removes two redundant SetGasPrice() calls in the startNode function that were causing multiple issues:

1. Overriding txpool's configured price limit with the miner's gas price setting, mixing two independent configurations:

- cfg.Eth.GasPrice (from --miner-gasprice --gasprice flag)
- cfg.TxPool.PriceLimit (from --txpool-pricelimit flag)

2. Reverting runtime gasPrice changes made via RPC. When users call miner_setGasPrice RPC method to adjust the gasPrice dynamically, the changes would be unexpectedly reverted at the next checkpoint when startNode re-applies cfg.Eth.GasPrice.

The txpool already initializes its gasPrice from config.PriceLimit during construction (core/txpool/txpool.go:333):

```go
func NewTxPool(config Config, chainconfig *params.ChainConfig, chain blockChain) *TxPool {
	pool := &TxPool{
		gasPrice:         new(big.Int).SetUint64(config.PriceLimit),
	}
```

When mining is started via RPC (miner_start), the MinerAPI.Start() method handles gasPrice propagation correctly.

This change ensures:

- The txpool respects its own configuration
- Runtime gasPrice adjustments via RPC persist across checkpoints
- No unexpected overriding of user-configured values
2025-12-22 12:01:38 +05:30
..
abigen cmd, internal: move func CheckExclusive() to package flags #31189 (#1747) 2025-11-15 16:47:38 +05:30
bootnode cmd, debug: fix debug_verbosity (#1030) 2025-05-08 16:10:53 +08:00
ethkey all: upgrade package version #30638 (#1745) 2025-11-15 16:46:54 +05:30
evm all: fix whitespace error of golangci-lint, remove extra empty lines (#1676) 2025-11-17 11:16:09 +05:30
p2psim all: upgrade package version #30638 (#1745) 2025-11-15 16:46:54 +05:30
puppeth all: use 0x-prefix string for type Address in log message (#1874) 2025-12-19 08:55:21 +04:00
rlpdump new EVM Upgrade 2021-09-21 16:53:46 +05:30
utils all: use 0x-prefix string for type Address in log message (#1874) 2025-12-19 08:55:21 +04:00
XDC cmd/XDC: fix txpool gasPrice being overridden at checkpoints (#1878) 2025-12-22 12:01:38 +05:30