Skip to content

Commit

Permalink
Configurable eth gas multiplier (#1412)
Browse files Browse the repository at this point in the history
* Configurable multiplier
  • Loading branch information
hareeshnagaraj committed Apr 16, 2021
1 parent c2f1ca2 commit 8b3ee6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions identity-service/src/config.js
Expand Up @@ -503,6 +503,12 @@ const config = convict({
format: String,
env: 'sentryDSN',
default: ''
},
ethGasMultiplier: {
doc: 'Constant value to multiply the configured FAST gas price by - in order to optimize tx success',
format: Number,
env: 'ethGasMultiplier',
default: 1.2
}
})

Expand Down
1 change: 1 addition & 0 deletions identity-service/src/relay/ethTxRelay.js
Expand Up @@ -67,6 +67,7 @@ const sendEthTransaction = async (req, txProps, reqBodySHA) => {

// Select the 'fast' gas price
let ethRelayGasPrice = ethGasPriceInfo[config.get('ethRelayerProdGasTier')]
ethRelayGasPrice = ethRelayGasPrice * parseFloat(config.get('ethGasMultiplier'))

let resp
try {
Expand Down

0 comments on commit 8b3ee6e

Please sign in to comment.