Remove special handling of builtin while pruning (#31719)

This commit is contained in:
Pankaj Garg 2023-05-19 09:35:48 -07:00 committed by GitHub
parent a8e2b82e38
commit 8fbe471cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -470,13 +470,11 @@ impl LoadedPrograms {
.rev()
.filter(|entry| {
let relation = fork_graph.relationship(entry.deployment_slot, new_root);
if matches!(entry.program, LoadedProgramType::Builtin(_)) {
true
} else if entry.deployment_slot >= new_root {
if entry.deployment_slot >= new_root {
matches!(relation, BlockRelation::Equal | BlockRelation::Descendant)
} else if !first_ancestor_found
&& (matches!(relation, BlockRelation::Ancestor)
|| entry.deployment_slot < previous_root)
|| entry.deployment_slot <= previous_root)
{
first_ancestor_found = true;
first_ancestor_found