-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix spurious refund error log to just be debug #2617
base: master
Are you sure you want to change the base?
Conversation
@@ -532,20 +532,30 @@ func (p *TxProcessor) EndTxHook(gasLeft uint64, success bool) { | |||
refund := func(refundFrom common.Address, amount *big.Int) { | |||
const errLog = "fee address doesn't have enough funds to give user refund" | |||
|
|||
logMissingRefund := func(err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets amend util.TransferBalance to give a specific error for low balance and test that this was indeed the error received.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a check for the error type. There's already a dedicated error type for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The error log was put in place when the fee accounts were EOAs, but now that they're contracts it's expected that this might be hit.