-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use tgrade custom in valset #182
Conversation
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.
Nitpicking comments, lgtm
@@ -41,5 +41,7 @@ cosmwasm-schema = { version = "1.0.0-soon" } | |||
cw-multi-test = { version = "=0.10.0-soon3" } | |||
tg4-engagement = { path = "../tg4-engagement", version = "0.4.0" } | |||
tg4-stake = { path = "../tg4-stake", version = "0.4.0" } | |||
# we enable multitest feature only for 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.
IMO this comment is redundant.
suite.app().update_block(|block| { | ||
block.height += 20; | ||
block.time = block.time.plus_seconds(100); | ||
}); |
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 think this 5s/block
ratio should be somehow/somewhere standarized (some constant in utils to calculate?).
I see it from time to time, but without context it may be weird to see that you increment height by seemingly arbitral 20.
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.
Yes, it is semi-codified here: https://github.com/CosmWasm/cw-plus/blob/main/packages/multi-test/src/app.rs#L23-L26
and based on typical block times on Cosmos chains. It would be good to make this a const
1c12949
to
2c536e3
Compare
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
One more fix for your comment on magic block times |
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
block.height += 20; | ||
block.time = block.time.plus_seconds(100); | ||
}); | ||
suite.app().advance_seconds(100); |
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.
👍
Builds on #180
This does a proper suite setup to use the Tgrade app, and register privileged contracts.
Does proper begin/end block calls to act like a real runtime.