-
Notifications
You must be signed in to change notification settings - Fork 586
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
test: UpdateStateOnMisbehaviour
using mock wasmVM
#4919
test: UpdateStateOnMisbehaviour
using mock wasmVM
#4919
Conversation
…stateonmisbehaviour-using-mock-vm-for-08-wasm
…stateonmisbehaviour-using-mock-vm-for-08-wasm
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.
🙏
…stateonmisbehaviour-using-mock-vm-for-08-wasm
…stateonmisbehaviour-using-mock-vm-for-08-wasm
…estateonmisbehaviour-using-mock-vm-for-08-wasm
…estateonmisbehaviour-using-mock-vm-for-08-wasm
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.
Left some initial comments
@@ -21,6 +21,8 @@ var ( | |||
|
|||
// sudoTypes contains all the possible sudo message types. | |||
sudoTypes = [...]any{UpdateStateMsg{}, UpdateStateOnMisbehaviourMsg{}, VerifyUpgradeAndUpdateStateMsg{}, CheckSubstituteAndUpdateStateMsg{}, VerifyMembershipMsg{}, VerifyNonMembershipMsg{}} | |||
|
|||
MockClientStateBz = []byte("mockClientStateBz") |
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.
I'd be happy to just use a []byte()
directly in the tests atm instead of adding a mock var (just in case we lose a bunch of places this could be reused).
Maybe we could add one later and replace all mock []byte()
occurrences thereafter, or until the linter cries oceans once again 🥲
Also fine if you wanna use this PR to replace all now, you'd just have to comb through all the tests to see, I definitely added []byte("client-state-data")
somewhere in verify membership tests
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.
i can just open an issue to track this mock var and change this for now
…estateonmisbehaviour-using-mock-vm-for-08-wasm
…estateonmisbehaviour-using-mock-vm-for-08-wasm
tc.malleate() | ||
|
||
if tc.panicErr == nil { | ||
clientState.UpdateStateOnMisbehaviour(suite.ctx, suite.chainA.App.AppCodec(), suite.store, clientMsg) |
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.
thing we're going towards removing suite.ctx
and suite.store
so suite.chainA.GetContext()
and suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), endpoint.ClientID)
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.
should we just make one issue/PR for all these instances? i think there are many in the codebase 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.
aye there's an issue already, I changed it in my PRs and if any are left they'll be caught by that issue when its time to shine comes.
suite.SetupWasmWithMockVM() | ||
endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) |
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.
add a space before space man arrives and gently scolds us.
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.
lgtm, left minor thingies
…ng-mock-vm-for-08-wasm' of github.com:cosmos/ibc-go into charly/issue#4822-add-testupdatestateonmisbehaviour-using-mock-vm-for-08-wasm
Description
closes: #4822
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.