mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Clean up
This commit is contained in:
@@ -363,6 +363,30 @@ pub fn indexed_payload_attestation_signature_set<'a, 'b, E, F>(
|
||||
indexed_payload_attestation: &'b IndexedPayloadAttestation<E>,
|
||||
spec: &'a ChainSpec,
|
||||
) -> Result<SignatureSet<'a>>
|
||||
where
|
||||
E: EthSpec,
|
||||
F: Fn(usize) -> Option<Cow<'a, PublicKey>>,
|
||||
{
|
||||
let fork = state.fork();
|
||||
|
||||
indexed_payload_attestation_signature_set_from_pubkeys(
|
||||
get_pubkey,
|
||||
signature,
|
||||
indexed_payload_attestation,
|
||||
&fork,
|
||||
state.genesis_validators_root(),
|
||||
spec,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn indexed_payload_attestation_signature_set_from_pubkeys<'a, 'b, E, F>(
|
||||
get_pubkey: F,
|
||||
signature: &'a AggregateSignature,
|
||||
indexed_payload_attestation: &'b IndexedPayloadAttestation<E>,
|
||||
fork: &Fork,
|
||||
genesis_validators_root: Hash256,
|
||||
spec: &'a ChainSpec,
|
||||
) -> Result<SignatureSet<'a>>
|
||||
where
|
||||
E: EthSpec,
|
||||
F: Fn(usize) -> Option<Cow<'a, PublicKey>>,
|
||||
@@ -378,12 +402,7 @@ where
|
||||
.data
|
||||
.slot
|
||||
.epoch(E::slots_per_epoch());
|
||||
let domain = spec.get_domain(
|
||||
epoch,
|
||||
Domain::PTCAttester,
|
||||
&state.fork(),
|
||||
state.genesis_validators_root(),
|
||||
);
|
||||
let domain = spec.get_domain(epoch, Domain::PTCAttester, fork, genesis_validators_root);
|
||||
|
||||
let message = indexed_payload_attestation.data.signing_root(domain);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user