We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f27e918 commit 99d9a80Copy full SHA for 99d9a80
stackslib/src/chainstate/nakamoto/miner.rs
@@ -536,6 +536,11 @@ impl NakamotoBlockBuilder {
536
.mempool_settings
537
.tenure_cost_limit_per_block_percentage
538
{
539
+ // Make sure we aren't actually going to multiply by 0 or attempt to increase the block limit.
540
+ assert!(
541
+ (1..100).contains(&percentage),
542
+ "BUG: tenure_cost_limit_per_block_percentage must be between between 1 and 99."
543
+ );
544
let mut remaining_limit = block_limit.clone();
545
let cost_so_far = tenure_tx.cost_so_far();
546
if remaining_limit.sub(&cost_so_far).is_ok() {
0 commit comments