tests: add comment explaining gas price

This commit is contained in:
Maximilian Krüger 2018-01-05 15:01:20 +01:00
parent 5bfa568833
commit 3fccc2ad7f
1 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,10 @@ contract('HomeBridge', function(accounts) {
actualGasCostOfWithdraw = web3.toBigNumber(result.receipt.gasUsed);
return web3.eth.getTransaction(result.tx);
}).then(function(tx) {
// getting the gas price dynamically instead of hardcoding it
// (which would require less code)
// is required because solidity-coverage sets it to 1
// and the usual default is 100000000000
gasPrice = tx.gasPrice;
relayCost = gasPrice.times(estimatedGasCostOfWithdraw);