diff options
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go index e26cbb3..9b6f1e4 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -559,3 +559,13 @@ func (s *Ethereum) AcceptedBlock() *types.Block { } return s.blockchain.CurrentBlock() } + +// SetGasPrice sets the minimum gas price to [newGasPrice] +// sets the price on [s], [txPool], and the gas price oracle +func (s *Ethereum) SetGasPrice(newGasPrice *big.Int) { + s.lock.Lock() + s.gasPrice = newGasPrice + s.lock.Unlock() + s.txPool.SetGasPrice(newGasPrice) + s.APIBackend.gpo.SetGasPrice(newGasPrice) +} |