-
Notifications
You must be signed in to change notification settings - Fork 580
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
Add flush status check in SendPacket #3912
Merged
chatton
merged 13 commits into
04-channel-upgrades
from
cian/issue#3875-add-flush-status-check-in-sendpacket-
Jun 28, 2023
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a290fed
add check for not equal NOTINFLUSH for SendPacket
chatton adfc53e
added test cases
chatton 31acbec
Merge branch '04-channel-upgrades' into cian/issue#3875-add-flush-sta…
chatton 40d9351
split out status flush check into separate conditional
chatton 3d29ad0
removed redundant flush status check
chatton 23b897f
Reorder check, be more specific with the cause.
DimitrisJim 6943317
Merge branch '04-channel-upgrades' into cian/issue#3875-add-flush-sta…
DimitrisJim 3a2fdd0
added additional test case
chatton ed4bdac
Merge branch '04-channel-upgrades' into cian/issue#3875-add-flush-sta…
chatton 1f406ea
remove unrequired check on endpoint B upgrade version
chatton 135a990
addressing PR feedback
chatton d4fd43f
Merge branch '04-channel-upgrades' into cian/issue#3875-add-flush-sta…
chatton 6666805
Merge branch '04-channel-upgrades' into cian/issue#3875-add-flush-sta…
chatton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -217,6 +217,42 @@ func (suite *KeeperTestSuite) TestSendPacket() { | |||||
|
||||||
channelCap = capabilitytypes.NewCapability(5) | ||||||
}, false}, | ||||||
{ | ||||||
"invalid flush status: FLUSHING", | ||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
sourceChannel = path.EndpointA.ChannelID | ||||||
|
||||||
channel := path.EndpointA.GetChannel() | ||||||
channel.FlushStatus = types.FLUSHING | ||||||
path.EndpointA.SetChannel(channel) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
{ | ||||||
"invalid flush status: FLUSHCOMPLETE", | ||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
sourceChannel = path.EndpointA.ChannelID | ||||||
|
||||||
channel := path.EndpointA.GetChannel() | ||||||
channel.FlushStatus = types.FLUSHCOMPLETE | ||||||
path.EndpointA.SetChannel(channel) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
{ | ||||||
"channel is in INITUPGRADE stage", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. state stage tomato tomago There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤠 |
||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
|
||||||
path.EndpointA.ChannelConfig.ProposedUpgrade.Fields.Version = ibcmock.UpgradeVersion | ||||||
|
||||||
err := path.EndpointA.ChanUpgradeInit() | ||||||
suite.Require().NoError(err) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
} | ||||||
|
||||||
for i, tc := range testCases { | ||||||
|
Oops, something went wrong.
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.
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.
does it make sense to add an additional check for channel state? I.e: