Skip to content

Commit

Permalink
Expecting too much from Rust syntax...
Browse files Browse the repository at this point in the history
  • Loading branch information
akashin committed Jul 24, 2023
1 parent e65ec09 commit ce04542
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nearcore/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ce04542

Please sign in to comment.