aboutsummaryrefslogtreecommitdiff
path: root/eth/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go10
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)
+}