Skip to content

Commit

Permalink
Address review comments and fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Oct 13, 2024
1 parent 01478c2 commit fc6f321
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 7 additions & 5 deletions beacon_chain/spec/eth2_apis/rest_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,17 @@ type
extra_data*: RestExtraData

func isLowestScoreAggregatedAttestation*(a: phase0.Attestation): bool =
(a.data.slot == Slot(0)) and (a.data.index == 0'u64) and
(a.data.source.epoch == Epoch(0)) and (a.data.target.epoch == Epoch(0))
(a.data.slot == GENESIS_SLOT) and
(a.data.index == 0'u64) and
(a.data.source.epoch == GENESIS_EPOCH) and
(a.data.target.epoch == GENESIS_EPOCH)

func isLowestScoreAggregatedAttestation*(a: ForkedAttestation): bool =
withAttestation(a):
(forkyAttestation.data.slot == Slot(0)) and
(forkyAttestation.data.slot == GENESIS_SLOT) and
(forkyAttestation.data.index == 0'u64) and
(forkyAttestation.data.source.epoch == Epoch(0)) and
(forkyAttestation.data.target.epoch == Epoch(0))
(forkyAttestation.data.source.epoch == GENESIS_EPOCH) and
(forkyAttestation.data.target.epoch == GENESIS_EPOCH)

func `==`*(a, b: RestValidatorIndex): bool {.borrow.}

Expand Down
3 changes: 3 additions & 0 deletions tests/test_signing_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type
process: AsyncProcessRef
reader: Future[seq[byte]]

GetElectraAggregatedAttestationResponse =
DataEnclosedObject[electra.Attestation]

func getNodePort(basePort: int, rt: RemoteSignerType): int =
# Individual port numbers derived by adding to configurable base port
case rt
Expand Down

0 comments on commit fc6f321

Please sign in to comment.