fixing recursive calls with caching

This commit is contained in:
hopinheimer
2026-03-20 16:10:43 -04:00
parent ab1305d490
commit cc8466dfa5
6 changed files with 488 additions and 60 deletions

View File

@@ -622,6 +622,18 @@ impl<E: EthSpec> Tester<E> {
self.apply_invalid_block(&block)?;
}
// Per spec test runner: an on_block step implies receiving block's attestations
// and attester slashings.
if success {
for attestation in block.message().body().attestations() {
let att = attestation.clone_as_attestation();
let _ = self.process_attestation(&att);
}
for attester_slashing in block.message().body().attester_slashings() {
self.process_attester_slashing(attester_slashing);
}
}
Ok(())
}
@@ -712,6 +724,18 @@ impl<E: EthSpec> Tester<E> {
self.apply_invalid_block(&block)?;
}
// Per spec test runner: an on_block step implies receiving block's attestations
// and attester slashings.
if success {
for attestation in block.message().body().attestations() {
let att = attestation.clone_as_attestation();
let _ = self.process_attestation(&att);
}
for attester_slashing in block.message().body().attester_slashings() {
self.process_attester_slashing(attester_slashing);
}
}
Ok(())
}