mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2024-12-23 14:49:29 -05:00
fix max gas price
This commit is contained in:
parent
850cfb3f7e
commit
2d478c5108
@ -19,7 +19,7 @@ class Sender {
|
||||
tx = JSON.parse(tx)
|
||||
if (Date.now() - tx.date > this.pendingTxTimeout) {
|
||||
const newGasPrice = toBN(tx.gasPrice).mul(toBN(this.gasBumpPercentage)).div(toBN(100))
|
||||
const maxGasPrice = toBN(toWei(config.maxGasPrice.toString()))
|
||||
const maxGasPrice = toBN(toWei(config.maxGasPrice.toString(), 'Gwei'))
|
||||
tx.gasPrice = toHex(BN.min(newGasPrice, maxGasPrice))
|
||||
tx.date = Date.now()
|
||||
await redisClient.set('tx:' + tx.nonce, JSON.stringify(tx))
|
||||
|
Loading…
Reference in New Issue
Block a user