Skip to content

Commit

Permalink
rename MAX_NUM_TRANSACTIONS_PER_BATCH (solana-labs#32023)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Jun 9, 2023
1 parent 4ebec90 commit 450e7c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/src/banking_stage/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ use {
},
};

pub const MAX_NUM_TRANSACTIONS_PER_BATCH: usize = 64;
/// Consumer will create chunks of transactions from buffer with up to this size.
pub const TARGET_NUM_TRANSACTIONS_PER_BATCH: usize = 64;

pub struct ProcessTransactionBatchOutput {
// The number of transactions filtered out by the cost model
Expand Down Expand Up @@ -285,7 +286,7 @@ impl Consumer {
while chunk_start != transactions.len() {
let chunk_end = std::cmp::min(
transactions.len(),
chunk_start + MAX_NUM_TRANSACTIONS_PER_BATCH,
chunk_start + TARGET_NUM_TRANSACTIONS_PER_BATCH,
);
let process_transaction_batch_output = self.process_and_record_transactions(
bank,
Expand Down Expand Up @@ -1349,7 +1350,7 @@ mod tests {
lamports + 1,
genesis_config.hash(),
);
MAX_NUM_TRANSACTIONS_PER_BATCH
TARGET_NUM_TRANSACTIONS_PER_BATCH
];

// Make one transaction that will succeed.
Expand Down Expand Up @@ -1407,7 +1408,7 @@ mod tests {
1,
genesis_config.hash()
);
MAX_NUM_TRANSACTIONS_PER_BATCH
TARGET_NUM_TRANSACTIONS_PER_BATCH
];

// Make one more in separate batch that also conflicts, but because it's in a separate batch, it
Expand Down

0 comments on commit 450e7c2

Please sign in to comment.