mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
superstruct the AttesterSlashing (#5636)
* `superstruct` Attester Fork Variants * Push a little further * Deal with Encode / Decode of AttesterSlashing * not so sure about this.. * Stop Encode/Decode Bounds from Propagating Out * Tons of Changes.. * More Conversions to AttestationRef * Add AsReference trait (#15) * Add AsReference trait * Fix some snafus * Got it Compiling! :D * Got Tests Building * Get beacon chain tests compiling --------- Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ pub fn run<E: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
|
||||
.into_iter()
|
||||
.map(|att| {
|
||||
let committee = state.get_beacon_committee(att.data().slot, att.data().index)?;
|
||||
get_indexed_attestation(committee.committee, &att)
|
||||
get_indexed_attestation(committee.committee, att.to_ref())
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(|e| format!("Error constructing indexed attestation: {:?}", e))?;
|
||||
|
||||
@@ -390,7 +390,7 @@ fn do_transition<E: EthSpec>(
|
||||
// Signature verification should prime the indexed attestation cache.
|
||||
assert_eq!(
|
||||
ctxt.num_cached_indexed_attestations(),
|
||||
block.message().body().attestations().len()
|
||||
block.message().body().attestations_len()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user