Skip to content

Commit

Permalink
fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe committed Sep 3, 2024
1 parent 99c334c commit adb1a41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 40 deletions.
50 changes: 11 additions & 39 deletions runtime/src/account_saver.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use {
solana_sdk::{
account::AccountSharedData, nonce::state::DurableNonce, pubkey::Pubkey,
transaction_context::TransactionAccount,
account::AccountSharedData, pubkey::Pubkey, transaction_context::TransactionAccount,
},
solana_svm::{
rollback_accounts::RollbackAccounts,
Expand Down Expand Up @@ -279,13 +278,8 @@ mod tests {
assert_eq!(max_collected_accounts, 2);

for collect_transactions in [false, true] {
let (collected_accounts, transactions) = collect_accounts_to_store(
&txs,
&mut processing_results,
&DurableNonce::default(),
0,
collect_transactions,
);
let (collected_accounts, transactions) =
collect_accounts_to_store(&txs, &processing_results, collect_transactions);
assert_eq!(collected_accounts.len(), 2);
assert!(collected_accounts
.iter()
Expand Down Expand Up @@ -347,16 +341,10 @@ mod tests {
)];
let max_collected_accounts = max_number_of_accounts_to_collect(&txs, &processing_results);
assert_eq!(max_collected_accounts, 1);
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());

for collect_transactions in [false, true] {
let (collected_accounts, transactions) = collect_accounts_to_store(
&txs,
&mut processing_results,
&durable_nonce,
0,
collect_transactions,
);
let (collected_accounts, transactions) =
collect_accounts_to_store(&txs, &processing_results, collect_transactions);
assert_eq!(collected_accounts.len(), 1);
assert_eq!(
collected_accounts
Expand Down Expand Up @@ -449,13 +437,8 @@ mod tests {
assert_eq!(max_collected_accounts, 2);

for collect_transactions in [false, true] {
let (collected_accounts, transactions) = collect_accounts_to_store(
&txs,
&mut processing_results,
&durable_nonce,
0,
collect_transactions,
);
let (collected_accounts, transactions) =
collect_accounts_to_store(&txs, &processing_results, collect_transactions);
assert_eq!(collected_accounts.len(), 2);
assert_eq!(
collected_accounts
Expand Down Expand Up @@ -561,13 +544,8 @@ mod tests {
assert_eq!(max_collected_accounts, 1);

for collect_transactions in [false, true] {
let (collected_accounts, transactions) = collect_accounts_to_store(
&txs,
&mut processing_results,
&durable_nonce,
0,
collect_transactions,
);
let (collected_accounts, transactions) =
collect_accounts_to_store(&txs, &processing_results, collect_transactions);
assert_eq!(collected_accounts.len(), 1);
let collected_nonce_account = collected_accounts
.iter()
Expand Down Expand Up @@ -619,16 +597,10 @@ mod tests {
)))];
let max_collected_accounts = max_number_of_accounts_to_collect(&txs, &processing_results);
assert_eq!(max_collected_accounts, 1);
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());

for collect_transactions in [false, true] {
let (collected_accounts, transactions) = collect_accounts_to_store(
&txs,
&mut processing_results,
&durable_nonce,
0,
collect_transactions,
);
let (collected_accounts, transactions) =
collect_accounts_to_store(&txs, &processing_results, collect_transactions);
assert_eq!(collected_accounts.len(), 1);
assert_eq!(
collected_accounts
Expand Down
1 change: 0 additions & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3798,7 +3798,6 @@ impl Bank {
}

let ((), store_accounts_us) = measure_us!({
let durable_nonce = DurableNonce::from_blockhash(&last_blockhash);
let (accounts_to_store, transactions) = collect_accounts_to_store(
sanitized_txs,
&processing_results,
Expand Down

0 comments on commit adb1a41

Please sign in to comment.