Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion contracts/fee_currencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,20 @@ func CreditFees(
return fmt.Errorf("%w: %x", exchange.ErrUnregisteredFeeCurrency, feeCurrency)
}
gasUsedForDebitAndCredit := gasUsedDebit + gasUsed
if gasUsedForDebitAndCredit > intrinsicGas {
if gasUsedForDebitAndCredit > 2*intrinsicGas {
log.Info(
"Gas usage for debit+credit exceeds intrinsic gas!",
"gasUsed", gasUsedForDebitAndCredit,
"intrinsicGas", intrinsicGas,
"feeCurrency", feeCurrency,
)
} else if gasUsedForDebitAndCredit > intrinsicGas {
log.Trace(
"Gas usage for debit+credit exceeds intrinsic gas, within a factor of 2.",
"gasUsed", gasUsedForDebitAndCredit,
"intrinsicGas", intrinsicGas,
"feeCurrency", feeCurrency,
)
}
return err
}
Expand Down