From 07f87e04c8ed5e96994d0d7b67357d8fde74db51 Mon Sep 17 00:00:00 2001 From: peg Date: Thu, 21 Nov 2024 16:58:52 +0100 Subject: [PATCH] Update client tests --- crates/client/src/tests.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/client/src/tests.rs b/crates/client/src/tests.rs index db3ab5e94..a05fdf05c 100644 --- a/crates/client/src/tests.rs +++ b/crates/client/src/tests.rs @@ -17,6 +17,7 @@ use crate::{ update_programs, }; +use entropy_shared::{QuoteContext, QuoteInputData}; use entropy_testing_utils::{ constants::{TEST_PROGRAM_WASM_BYTECODE, TSS_ACCOUNTS, X25519_PUBLIC_KEYS}, helpers::encode_verifying_key, @@ -54,11 +55,8 @@ async fn test_change_endpoint() { let signing_key = tdx_quote::SigningKey::random(&mut OsRng); let public_key = sr25519::Public(tss_account_id.0); - // We need to add `1` here since the quote is being checked in the next block - let block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number + 1; - let input_data = - entropy_shared::QuoteInputData::new(public_key, x25519_public_key, nonce, block_number); + QuoteInputData::new(public_key, x25519_public_key, nonce, QuoteContext::ChangeEndpoint); let mut pck_seeder = StdRng::from_seed(public_key.0); let pck = tdx_quote::SigningKey::random(&mut pck_seeder); @@ -129,14 +127,11 @@ async fn test_change_threshold_accounts() { let pck_certificate_chain = vec![tss_public_key.0.to_vec()]; let quote = { - // We need to add `1` here since the quote is being checked in the next block - let block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number + 1; - let input_data = entropy_shared::QuoteInputData::new( tss_public_key, *x25519_public_key.as_bytes(), nonce, - block_number, + QuoteContext::ChangeThresholdAccounts, ); let signing_key = tdx_quote::SigningKey::random(&mut OsRng);