From 789ef8b6a9645f775a14ed6e802fd4d37a401c9b Mon Sep 17 00:00:00 2001 From: Andrei Kashin Date: Mon, 24 Jul 2023 16:39:46 +0100 Subject: [PATCH] Expecting too much from Rust syntax... --- nearcore/src/runtime/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nearcore/src/runtime/mod.rs b/nearcore/src/runtime/mod.rs index d803623c750..b3388c015a1 100644 --- a/nearcore/src/runtime/mod.rs +++ b/nearcore/src/runtime/mod.rs @@ -698,7 +698,8 @@ impl RuntimeAdapter for NightshadeRuntime { // a bound of at most 10000 receipts processed in a chunk. let delayed_receipts_indices: DelayedReceiptIndices = near_store::get(&state_update, &TrieKey::DelayedReceiptIndices)?.unwrap_or_default(); - let new_receipt_count_limit = if let min_fee = runtime_config.fees.fee(ActionCosts::new_action_receipt).exec_fee() > 0 { + let min_fee = runtime_config.fees.fee(ActionCosts::new_action_receipt).exec_fee(); + let new_receipt_count_limit = if min_fee > 0 { let max_processed_receipts_in_chunk = gas_limit / min_fee; max_processed_receipts_in_chunk.saturating_sub(delayed_receipts_indices.len()) as usize } else {