Skip to content

Commit b60b560

Browse files
committed
fix typing errors
1 parent 76e2a2a commit b60b560

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

eth/beacon/state_machines/forks/serenity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def validate_attestation(self,
2828
attestation: Attestation,
2929
is_validating_signatures: bool=True) -> None:
3030
validate_serenity_attestation(
31-
self,
31+
self.state,
3232
attestation,
3333
self.config.EPOCH_LENGTH,
3434
self.config.MIN_ATTESTATION_INCLUSION_DELAY,

eth/beacon/state_machines/forks/serenity/validation.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
from eth_utils import (
55
ValidationError,
66
)
7+
import rlp
8+
from typing import Type
9+
710
from eth.constants import (
811
ZERO_HASH32,
912
)
1013

11-
import rlp
1214

1315
from eth.beacon.enums import (
1416
SignatureDomain,
@@ -32,7 +34,7 @@
3234
#
3335
# Attestation validation
3436
#
35-
def validate_serenity_attestation(state: BeaconState,
37+
def validate_serenity_attestation(state: Type[BeaconState],
3638
attestation: Attestation,
3739
epoch_length: int,
3840
min_attestation_inclusion_delay: int,
@@ -77,6 +79,7 @@ def validate_serenity_attestation(state: BeaconState,
7779
validate_serenity_attestation_aggregate_signature(
7880
state,
7981
attestation,
82+
epoch_length,
8083
)
8184

8285

@@ -201,7 +204,7 @@ def validate_serenity_attestation_shard_block_root(attestation_data: Attestation
201204
)
202205

203206

204-
def validate_serenity_attestation_aggregate_signature(state: BeaconState,
207+
def validate_serenity_attestation_aggregate_signature(state: Type[BeaconState],
205208
attestation: Attestation,
206209
epoch_length: int) -> None:
207210
"""
@@ -220,7 +223,7 @@ def validate_serenity_attestation_aggregate_signature(state: BeaconState,
220223
epoch_length=epoch_length,
221224
)
222225

223-
pubkeys = (
226+
pubkeys = tuple(
224227
state.validator_registry[validator_index].pubkey
225228
for validator_index in participant_indices
226229
)

0 commit comments

Comments
 (0)