-
Notifications
You must be signed in to change notification settings - Fork 85
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 lp-gateway routers' weight and fee calculations #1537
Conversation
And adjust the integration tests to use reasonable amounts and verify the fees being charged.
We have to keep the |
@cdamian @wischli @mustermeiszer this should be ready now. The only thing we need to discuss is migrations, which would only be needed for |
Nope we just set a new router for algol |
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.
Can we merge this?
yes please :) if there are no review remarks ofc. |
@@ -814,10 +814,28 @@ fn add_currency() { | |||
}) | |||
)); | |||
|
|||
assert_eq!( |
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.
Thank you for adding these checks! <3
@@ -315,29 +304,6 @@ mod xcm_router { | |||
assert_ok!(router.do_send(test_data.sender, test_data.msg)); | |||
}); | |||
} | |||
|
|||
#[test] | |||
fn transactor_info_not_set() { |
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.
Thanks for removing this, it was a left-over from the time we had init logic in the router IIRC.
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.
My artifact. just thought it is still valid to test whether it works if global info is not set. But is implicitly anyways tested ^^
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.
Thank you @NunoAlexandre !
Changes
Drop the
XcmRouter
.fee_per_second
field and add the 2 following new onesThat way we have complete control over those two values being passed down to
XcmTransactor
, instead of storing values which then have harcoded calculations in the runtime which we can't change without a runtime upgrade.