Skip to content
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

Merged
merged 4 commits into from
Sep 28, 2024
Merged

Conversation

PlasmaPower
Copy link
Collaborator

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.

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Aug 28, 2024
@@ -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) {
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tsahee tsahee merged commit 4a93769 into master Sep 28, 2024
15 checks passed
@tsahee tsahee deleted the spurious-refund-error branch September 28, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants