Skip to content

Commit

Permalink
Smaller safety margin for all
Browse files Browse the repository at this point in the history
  • Loading branch information
coderofstuff committed Oct 26, 2024
1 parent dcd3f5c commit 32f890d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions consensus/src/processes/pruning_proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,15 +873,11 @@ impl PruningProofManager {

// We only have the headers store (which has level 0 blue_scores) to assemble the proof data from.
// We need to look deeper at higher levels (2x deeper every level) to find 2M (plus margin) blocks at that level
let mut required_base_level_depth = if level == 0 {
required_level_depth + 100 // smaller safety margin
} else {
self.estimated_blue_depth_at_level_0(
level,
required_level_depth * 5 / 4, // We take a safety margin
current_dag_level,
)
};
let mut required_base_level_depth = self.estimated_blue_depth_at_level_0(
level,
required_level_depth + 100, // We take a safety margin
current_dag_level,
);

let mut is_last_level_header;
let mut tries = 0;
Expand Down

0 comments on commit 32f890d

Please sign in to comment.