Skip to content

Commit

Permalink
Prevents built-ins from being pruned.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed May 18, 2023
1 parent 19365db commit cf57e0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion program-runtime/src/loaded_programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ impl LoadedPrograms {
.rev()
.filter(|entry| {
let relation = fork_graph.relationship(entry.deployment_slot, new_root);
if entry.deployment_slot >= new_root {
if matches!(entry.program, LoadedProgramType::Builtin(_)) {
true
} else if entry.deployment_slot >= new_root {
matches!(relation, BlockRelation::Equal | BlockRelation::Descendant)
} else if !first_ancestor_found
&& (matches!(relation, BlockRelation::Ancestor)
Expand Down

0 comments on commit cf57e0a

Please sign in to comment.