Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
chore(api)!: move checks from Transfer to OnSendPacket #7068
chore(api)!: move checks from Transfer to OnSendPacket #7068
Changes from 5 commits
3425726
7285344
ca07c45
f0f21ff
e0fc870
e98e568
3fec066
4d15a77
503e790
ffa3343
3dd7deb
36e4b05
be9f558
77fbb3a
ae8ba6b
a2d0b74
4d87e21
04de448
87b2411
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This was needed in order to be able to call it from
OnSendPacket
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.
there is some commented out code on L54 that can be removed now!
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.
This check was left in this function as the logic is not easy to implement on
OnSendPacket
, we would have to exportBankKeeper
but also add a lot of logic to convertcoins
back totokens
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.
This check is necessary to be moved. We can move it into
keeper.OnSendPacket
. There's already logic to convert tokens to coin thereThere 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.
Note: going forward, users can invoke
OnSendPacket
without usingMsgTransfer
, so it's unsafe to have any necessary checks remain inMsgTransfer
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.
this is an unnecessary addition?
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.
No idea how this got in, sorry :/
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.
would recommend doing changes like this against main since it is unrelated to the port router changes
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.
this was the result of a weird merge, because we used to
panic
here so I added a similar change but not identical, will revertThere 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.
This test now doesn't succeed due to the following logic:
Transfer
does not check for the version/forwarding combination anymoreNote that there is still a check on
OnSendPacket
but it will not be triggered because Hops will not be present.I'll open an issue to add tests specifically for
OnSendPacket
since we currently do not have themThere 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.
It should? I wonder if this was not working because of the
1
->0
change?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.
ouch thanks, yeah it does. I'm trying to give up coffee starting today and you can see the results :(