Skip to content

Commit 363dc52

Browse files
committed
PR feedback and fix for linter
1 parent 874986b commit 363dc52

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

eth/beacon/db/chain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def _get_canonical_block_hash_by_slot(
229229
db: BaseDB,
230230
slot: int) -> Hash32:
231231
validate_slot(slot)
232-
return cls._get_canonical_block_hash(db, slot)
232+
return cls._get_canonical_block_hash(db, slot)
233233

234234
def get_canonical_head(self) -> BaseBeaconBlock:
235235
"""

eth/beacon/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def aggregate_attestation_record(last_justified_slot: int,
439439
block.shard_block_hash,
440440
last_justified_slot,
441441
)
442-
442+
443443
bitfield, sigs = aggregate_votes(
444444
message,
445445
votes,
@@ -475,7 +475,7 @@ def aggregate_votes(message: bytes,
475475
bitfield = pipe(
476476
bitfield,
477477
*(
478-
functools.partial(set_voted, index=committee_index)
478+
set_voted(index=committee_index)
479479
for committee_index in committee_indices
480480
)
481481
)

eth/beacon/state_machines/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def attest_proposed_block(self,
433433
"""
434434
Return the initial attestation by the block proposer.
435435
436-
The proposer broadcasts zir attestation with the proposed block.
436+
The proposer broadcasts their attestation with the proposed block.
437437
"""
438438
block_committees_info = get_block_committees_info(
439439
block,
@@ -499,9 +499,8 @@ def validate_randao_reveal(cls) -> None:
499499
#
500500
# Attestation validation
501501
#
502-
@classmethod
503-
def validate_attestation(cls,
504-
block: BaseBeaconBlock,
502+
@staticmethod
503+
def validate_attestation(block: BaseBeaconBlock,
505504
parent_block: BaseBeaconBlock,
506505
crystallized_state: CrystallizedState,
507506
active_state: ActiveState,

eth/utils/bitfield.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def has_voted(bitfield: bytes, index: int) -> bool:
1717
return bool(bitfield[index // 8] & (128 >> (index % 8)))
1818

1919

20+
@curry
2021
def set_voted(bitfield: bytes, index: int) -> bytes:
2122
byte_index = index // 8
2223
bit_index = index % 8

0 commit comments

Comments
 (0)