Generalize matching criteria for tombstone at boot up (#31547)
Generalize matching criteria for tombstone at bootup
This commit is contained in:
parent
6a4a0418a6
commit
3845423e17
|
@ -318,7 +318,7 @@ impl LoadedProgramsForTxBatch {
|
|||
|
||||
pub enum LoadedProgramMatchCriteria {
|
||||
DeployedOnOrAfterSlot(Slot),
|
||||
Closed,
|
||||
Tombstone,
|
||||
NoCriteria,
|
||||
}
|
||||
|
||||
|
@ -410,9 +410,7 @@ impl LoadedPrograms {
|
|||
LoadedProgramMatchCriteria::DeployedOnOrAfterSlot(slot) => {
|
||||
program.deployment_slot >= *slot
|
||||
}
|
||||
LoadedProgramMatchCriteria::Closed => {
|
||||
matches!(program.program, LoadedProgramType::Closed)
|
||||
}
|
||||
LoadedProgramMatchCriteria::Tombstone => program.is_tombstone(),
|
||||
LoadedProgramMatchCriteria::NoCriteria => true,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4461,7 +4461,7 @@ impl Bank {
|
|||
(
|
||||
*pubkey,
|
||||
self.program_modification_slot(pubkey)
|
||||
.map_or(LoadedProgramMatchCriteria::Closed, |slot| {
|
||||
.map_or(LoadedProgramMatchCriteria::Tombstone, |slot| {
|
||||
LoadedProgramMatchCriteria::DeployedOnOrAfterSlot(slot)
|
||||
}),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue