reverse params in get_aggregate_and_proof to match ssz type

This commit is contained in:
Danny Ryan 2020-02-11 15:49:45 -07:00
parent d2e08c0cdf
commit f7181adece
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 2 additions and 7 deletions

View File

@ -468,12 +468,12 @@ Selection proofs are provided in `AggregateAndProof` to prove to the gossip chan
`AggregateAndProof` messages are signed by the aggregator and broadcast inside of `SignedAggregateAndProof` objects to prevent a class of DoS attacks and message forgeries.
First, `aggregate_and_proof = get_aggregate_and_proof(state, aggregate_attestation, validator_index, privkey)` is contructed.
First, `aggregate_and_proof = get_aggregate_and_proof(state, validator_index, aggregate_attestation, privkey)` is constructed.
```python
def get_aggregate_and_proof(state: BeaconState,
aggregate: Attestation,
aggregator_index: ValidatorIndex,
aggregate: Attestation,
privkey: int) -> AggregateAndProof:
return AggregateAndProof(
aggregator_index=aggregator_index,
@ -503,11 +503,6 @@ class AggregateAndProof(Container):
selection_proof: BLSSignature
```
Where
* `aggregator_index` is the validator's `ValidatorIndex`.
* `aggregate` is the `aggregate_attestation` constructed in the previous section.
* `selection_proof` is the signature of the slot (`get_slot_signature()`).
##### `SignedAggregateAndProof`
```python