Skip to content

Commit

Permalink
Remove debug print and optimize lock
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Aug 16, 2024
1 parent 446a277 commit c0a665b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
21 changes: 6 additions & 15 deletions svm/tests/concurrent_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,12 @@ fn svm_concurrent() {
let mut account_data = AccountSharedData::default();
account_data.set_lamports(BALANCE);

mock_bank
.account_shared_data
.write()
.unwrap()
.insert(sender, account_data.clone());
mock_bank
.account_shared_data
.write()
.unwrap()
.insert(recipient, account_data.clone());
mock_bank
.account_shared_data
.write()
.unwrap()
.insert(fee_payer, account_data);
{
let shared_data = &mut mock_bank.account_shared_data.write().unwrap();
shared_data.insert(sender, account_data.clone());
shared_data.insert(recipient, account_data.clone());
shared_data.insert(fee_payer, account_data);
}

transaction_builder.create_instruction(
program_id,
Expand Down
1 change: 0 additions & 1 deletion svm/tests/mock_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ fn load_program(name: String) -> Vec<u8> {
dir.push(name.as_str());
let name = name.replace('-', "_");
dir.push(name + "_program.so");
std::println!("The dir is: {:?}", dir);
let mut file = File::open(dir.clone()).expect("file not found");
let metadata = fs::metadata(dir).expect("Unable to read metadata");
let mut buffer = vec![0; metadata.len() as usize];
Expand Down

0 comments on commit c0a665b

Please sign in to comment.