mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Finish EF Test Fork Agnostic (#5714)
This commit is contained in:
@@ -239,7 +239,6 @@ impl<E: EthSpec> PubsubMessage<E> {
|
|||||||
Ok(PubsubMessage::ProposerSlashing(Box::new(proposer_slashing)))
|
Ok(PubsubMessage::ProposerSlashing(Box::new(proposer_slashing)))
|
||||||
}
|
}
|
||||||
GossipKind::AttesterSlashing => {
|
GossipKind::AttesterSlashing => {
|
||||||
// TODO(electra): could an older attester slashing still be floating around during the fork transition?
|
|
||||||
let attester_slashing =
|
let attester_slashing =
|
||||||
match fork_context.from_context_bytes(gossip_topic.fork_digest) {
|
match fork_context.from_context_bytes(gossip_topic.fork_digest) {
|
||||||
Some(ForkName::Base)
|
Some(ForkName::Base)
|
||||||
|
|||||||
@@ -122,8 +122,15 @@ impl<E: EthSpec> Operation<E> for AttesterSlashing<E> {
|
|||||||
"attester_slashing".into()
|
"attester_slashing".into()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decode(path: &Path, _fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
fn decode(path: &Path, fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
||||||
Ok(Self::Base(ssz_decode_file(path)?))
|
Ok(match fork_name {
|
||||||
|
ForkName::Base
|
||||||
|
| ForkName::Altair
|
||||||
|
| ForkName::Bellatrix
|
||||||
|
| ForkName::Capella
|
||||||
|
| ForkName::Deneb => Self::Base(ssz_decode_file(path)?),
|
||||||
|
ForkName::Electra => Self::Electra(ssz_decode_file(path)?),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn apply_to(
|
fn apply_to(
|
||||||
|
|||||||
Reference in New Issue
Block a user