-
Notifications
You must be signed in to change notification settings - Fork 402
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(agents/sealevel): handle non configured igp account payments #5075
base: main
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5075 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
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.
thought about it, I'm down to do this for now but let's add a comment clearly flagging why we did this / what the impact is / indicating we may want to change in the future if we want to index multiple IGPs at a time
tracing::debug!(sealevel_payment=?sealevel_payment, igp_account_filter=?igp_account_filter, "Found interchain gas payment for a different IGP account, skipping"); | ||
tracing::debug!(sealevel_payment=?sealevel_payment, igp_account_filter=?igp_account_filter, "Found interchain gas payment for a different IGP account, neutralizing payment"); | ||
|
||
let non_matching_payment = InterchainGasPayment { |
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.
getting a little hard to read, could we change the logic around here starting with line 249 to be something like:
if let Ok(mut sealevel_payment) = self.get_payment_with_sequence(nonce.into()).await {
// Comment explaining why we do this
if sealevel_payment.igp_account_pubkey != self.igp.igp_account {
sealevel_payment.gas_amount = U256::zero();
sealevel_payment.payment = U256::zero();
}
payments.push((sealevel_payment.payment, sealevel_payment.log_meta));
}
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.
done
Description
Drive-by changes
Related issues
Backward compatibility
Yes
Testing