-
Notifications
You must be signed in to change notification settings - Fork 2
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 test showing register and sign with test client #1012
Conversation
ya we do, you do it here https://github.com/entropyxyz/entropy-core/pull/1012/files#diff-e1d8c0027f2fda5b3998b919bb461f5935ad1f6690b719c637968150be6f5e76R1581 this "tricks" the network into that state |
i thought we probably wouldn't be able to call that function without |
@ameba23 this is pretty cool! I say it would be worth it to spend a little bit of time trying to turn this into an integration test if possible. If not, maybe a another place for it could be the |
9d6963f
to
490a590
Compare
pub async fn jump_start_network_with_signer( | ||
api: &OnlineClient<EntropyConfig>, | ||
rpc: &LegacyRpcMethods<EntropyConfig>, | ||
signer: &PairSigner<EntropyConfig, sr25519::Pair>, |
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 because sp_keyring
is a development dependency and we now need this fn in release mode if the test_helpers
feature is present. So here we pass a signer in instead of getting it from the keyring, and the unit tests use a wrapped version of this function which grabs alice from the keyring.
So @JesseAbram you were right the mock jump start will work fine outside of So i have made this into an integration test. |
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.
👍
@HCastano you don't need to merge this, i just wanted to see it passing.
I really wanted to make this an integration test, but it didn't work out. The cool thing about the new registration flow is that we can test it in integration because it doesn't rely on there being multiple chain nodes.
But not quite. We have the pre-existing parent keyshares - but we don't have a way to get the chain to a state where jumpstart is completed. The staking extension pallet's genesis config would need to let us put the chain into a jump start completed state. Something for another PR.