-
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
Remove confirm_registered
extrinsic
#1025
Changes from all commits
1cf0d29
529f054
8384d39
1082205
e82a974
eb97b38
fa508b8
9b1bd9e
aaf5871
8f3a99c
805237d
92fe6ec
44bbcc0
936bfd0
c37ce78
e0a1d31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,9 +120,8 @@ use crate::{ | |
signing::Hasher, | ||
substrate::{get_oracle_data, query_chain, submit_transaction}, | ||
tests::{ | ||
check_has_confirmation, check_if_confirmation, create_clients, initialize_test_logger, | ||
jump_start_network_with_signer, remove_program, run_to_block, setup_client, | ||
spawn_testing_validators, unsafe_get, | ||
create_clients, initialize_test_logger, jump_start_network_with_signer, remove_program, | ||
run_to_block, setup_client, spawn_testing_validators, unsafe_get, | ||
}, | ||
user::compute_hash, | ||
validator::get_signer_and_x25519_secret_from_mnemonic, | ||
|
@@ -132,9 +131,8 @@ use crate::{ | |
signing_client::ListenerState, | ||
user::{ | ||
api::{ | ||
check_hash_pointer_out_of_bounds, confirm_registered, increment_or_wipe_request_limit, | ||
request_limit_check, request_limit_key, RequestLimitStorage, UserRegistrationInfo, | ||
UserSignatureRequest, | ||
check_hash_pointer_out_of_bounds, increment_or_wipe_request_limit, request_limit_check, | ||
request_limit_key, RequestLimitStorage, UserRegistrationInfo, UserSignatureRequest, | ||
}, | ||
UserErr, | ||
}, | ||
|
@@ -684,6 +682,7 @@ async fn test_program_with_config() { | |
clean_tests(); | ||
} | ||
|
||
#[ignore] | ||
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. This test fails because it depends on 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. omg i can't wait to see this test get deleted it has been a pita do we not already have tests which use the new registration flow? 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. We do have them, but I want to go through the old tests to see if there are any failure conditions that I haven't checked in the new tests. |
||
#[tokio::test] | ||
#[serial] | ||
async fn test_store_share() { | ||
|
@@ -852,7 +851,6 @@ async fn test_store_share() { | |
|
||
assert_eq!(response_not_validator.status(), StatusCode::MISDIRECTED_REQUEST); | ||
|
||
check_if_confirmation(&api, &rpc, &alice.pair(), new_verifying_key).await; | ||
// TODO check if key is in other subgroup member | ||
clean_tests(); | ||
} | ||
|
@@ -1561,79 +1559,6 @@ async fn test_new_registration_flow() { | |
clean_tests(); | ||
} | ||
|
||
#[tokio::test] | ||
#[serial] | ||
async fn test_mutiple_confirm_done() { | ||
initialize_test_logger().await; | ||
clean_tests(); | ||
|
||
let alice = AccountKeyring::Alice; | ||
let bob = AccountKeyring::Bob; | ||
|
||
let alice_program = AccountKeyring::Charlie; | ||
let program_manager = AccountKeyring::Dave; | ||
|
||
let cxt = test_context_stationary().await; | ||
let api = get_api(&cxt.node_proc.ws_url).await.unwrap(); | ||
let rpc = get_rpc(&cxt.node_proc.ws_url).await.unwrap(); | ||
|
||
let program_hash = store_program( | ||
&api, | ||
&rpc, | ||
&program_manager.pair(), | ||
TEST_PROGRAM_WASM_BYTECODE.to_owned(), | ||
vec![], | ||
vec![], | ||
vec![], | ||
) | ||
.await | ||
.unwrap(); | ||
|
||
put_register_request_on_chain( | ||
&api, | ||
&rpc, | ||
&alice, | ||
alice_program.to_account_id().into(), | ||
BoundedVec(vec![ProgramInstance { program_pointer: program_hash, program_config: vec![] }]), | ||
) | ||
.await; | ||
|
||
put_register_request_on_chain( | ||
&api, | ||
&rpc, | ||
&bob, | ||
alice_program.to_account_id().into(), | ||
BoundedVec(vec![ProgramInstance { program_pointer: program_hash, program_config: vec![] }]), | ||
) | ||
.await; | ||
|
||
let (signer_alice, _) = get_signer_and_x25519_secret_from_mnemonic(DEFAULT_MNEMONIC).unwrap(); | ||
|
||
confirm_registered( | ||
&api, | ||
&rpc, | ||
alice.to_account_id().into(), | ||
&signer_alice, | ||
DEFAULT_VERIFYING_KEY.to_vec(), | ||
0u32, | ||
) | ||
.await | ||
.unwrap(); | ||
confirm_registered( | ||
&api, | ||
&rpc, | ||
bob.to_account_id().into(), | ||
&signer_alice, | ||
DEFAULT_VERIFYING_KEY.to_vec(), | ||
1u32, | ||
) | ||
.await | ||
.unwrap(); | ||
check_has_confirmation(&api, &rpc, &alice.pair()).await; | ||
check_has_confirmation(&api, &rpc, &bob.pair()).await; | ||
clean_tests(); | ||
} | ||
|
||
#[tokio::test] | ||
#[serial] | ||
async fn test_increment_or_wipe_request_limit() { | ||
|
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.
Not sure if we still need this argument, or the check below since this should only ever be called with the network parent key but no harm in leaving it in.
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.
Yeah I think this can get cleaned up, but it'll be more clear how when I rip out the old registration flow