Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Add cached VM program check
Browse files Browse the repository at this point in the history
  • Loading branch information
iamalwaysuncomfortable committed Nov 8, 2023
1 parent 7482d2b commit d13d139
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod tests {
"-k",
&recipient_private_key.to_string(),
"-e",
"localhost:3030",
"localhost:3033",
]);

assert!(deploy_bad_peer.unwrap().parse().is_err());
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ mod tests {
"--fee",
"0.7",
"-e",
"localhost:3030",
"localhost:3033",
]);

assert!(execute_bad_peer.unwrap().parse().is_err());
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ mod tests {
"--fee",
"0.7",
"-e",
"localhost:3030",
"localhost:3033",
]);

assert!(transfer_bad_peer.unwrap().parse().is_err());
Expand All @@ -281,7 +281,7 @@ mod tests {
"--fee",
"0.7",
"-e",
"http://localhost:3030",
"http://localhost:3033",
]);
assert!(transfer_zero_amount.unwrap().parse().is_err());
}
Expand Down
6 changes: 3 additions & 3 deletions rust/src/program/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ mod tests {

// Wait for the node to bootup
thread::sleep(std::time::Duration::from_secs(5));
transfer_to_test_account(2000000001, 14, recipient_private_key, "3030").unwrap();
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3030");
transfer_to_test_account(2000000001, 14, recipient_private_key, "3033").unwrap();
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3033");
let record_finder = RecordFinder::<Testnet3>::new(api_client.clone());
let temp_dir = setup_directory("aleo_test_deploy", CREDITS_IMPORT_TEST_PROGRAM, vec![]).unwrap();

Expand Down Expand Up @@ -307,7 +307,7 @@ mod tests {
let record_5_microcredits = Record::<Testnet3, Plaintext<Testnet3>>::from_str(RECORD_5_MICROCREDITS).unwrap();
let record_2000000001_microcredits =
Record::<Testnet3, Plaintext<Testnet3>>::from_str(RECORD_2000000001_MICROCREDITS).unwrap();
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3030");
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3033");
let randomized_program = random_program();
let randomized_program_id = randomized_program.id().to_string();
let randomized_program_string = randomized_program.to_string();
Expand Down
2 changes: 1 addition & 1 deletion rust/src/program/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ mod tests {
let private_key = PrivateKey::<Testnet3>::from_str(RECIPIENT_PRIVATE_KEY).unwrap();
let encrypted_private_key =
crate::Encryptor::encrypt_private_key_with_secret(&private_key, "password").unwrap();
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3030");
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3033");
let record_finder = RecordFinder::new(api_client.clone());
let mut program_manager =
ProgramManager::<Testnet3>::new(Some(private_key), None, Some(api_client.clone()), None, false).unwrap();
Expand Down
4 changes: 2 additions & 2 deletions rust/src/program/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ mod tests {
visibility: TransferType,
) {
println!("Attempting to transfer of type: {visibility:?} of {amount} to {recipient:?}");
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3030");
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3033");
let program_manager =
ProgramManager::<Testnet3>::new(Some(*sender), None, Some(api_client.clone()), None, false).unwrap();
let record_finder = RecordFinder::new(api_client);
Expand Down Expand Up @@ -247,7 +247,7 @@ mod tests {
PrivateKey::<Testnet3>::from_str("APrivateKey1zkp3NchSbrypyf2UoJSGyag58biAFPvtd1WtpM5M9pqoifK").unwrap();
let public_to_private_recipient_view_key = ViewKey::try_from(&public_to_private_recipient_private_key).unwrap();
let public_to_private_recipient_address = Address::try_from(&public_to_private_recipient_view_key).unwrap();
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3030");
let api_client = AleoAPIClient::<Testnet3>::local_testnet3("3033");
let public_address_literal = Literal::<Testnet3>::from_str(&public_recipient_address.to_string()).unwrap();
let private_to_public_address_literal =
Literal::<Testnet3>::from_str(&private_to_public_recipient_address.to_string()).unwrap();
Expand Down

0 comments on commit d13d139

Please sign in to comment.