fix: don't filter out hardforks (#10723)

This commit is contained in:
Oliver
2024-09-05 21:05:19 +02:00
committed by GitHub
parent 7fd16914a4
commit 665bfd7e30

View File

@@ -680,10 +680,13 @@ impl From<Genesis> for ChainSpec {
let mut ordered_hardforks = Vec::with_capacity(hardforks.len());
for (hardfork, _) in mainnet_order {
if let Some(pos) = hardforks.iter().position(|(e, _)| **e == *hardfork) {
ordered_hardforks.push(hardforks[pos].clone());
ordered_hardforks.push(hardforks.remove(pos));
}
}
// append the remaining unknown hardforks to ensure we don't filter any out
ordered_hardforks.extend(hardforks);
// NOTE: in full node, we prune all receipts except the deposit contract's. We do not
// have the deployment block in the genesis file, so we use block zero. We use the same
// deposit topic as the mainnet contract if we have the deposit contract address in the