bank: reuse last hash/fees helper to instatiate `InvokeContext`

This commit is contained in:
Trent Nelson 2021-12-01 00:30:43 -07:00 committed by Trent Nelson
parent 91c6a10cda
commit 1fae3d24de
1 changed files with 2 additions and 10 deletions

View File

@ -3877,16 +3877,8 @@ impl Bank {
let compute_meter = ComputeMeter::new_ref(compute_budget.max_units);
let (blockhash, lamports_per_signature) = {
let blockhash_queue = self.blockhash_queue.read().unwrap();
let blockhash = blockhash_queue.last_hash();
(
blockhash,
blockhash_queue
.get_lamports_per_signature(&blockhash)
.unwrap_or(self.fee_rate_governor.lamports_per_signature),
)
};
let (blockhash, lamports_per_signature) =
self.last_blockhash_and_lamports_per_signature();
if let Some(legacy_message) = tx.message().legacy_message() {
process_result = MessageProcessor::process_message(