Skip to content

Commit

Permalink
fix open api test
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Jul 23, 2024
1 parent 9b49b04 commit cbb3f88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"operationId" : "getPoolAttestations",
"summary" : "Get Attestations from operations pool",
"description" : "Retrieves attestations known by the node but not necessarily incorporated into any block.",
"deprecated" : true,
"parameters" : [ {
"name" : "slot",
"in" : "query",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ public ObjectAndMetaData<List<Attestation>> getAttestationsAndMetaData(

private ObjectAndMetaData<List<Attestation>> lookupMetaData(
final List<Attestation> attestations, final Optional<UInt64> maybeSlot) {
final UInt64 slot = getSlotForAttestations(attestations, maybeSlot);
final UInt64 slot = getSlot(attestations, maybeSlot);
return new ObjectAndMetaData<>(
attestations, spec.atSlot(slot).getMilestone(), false, false, false);
}

private UInt64 getSlotForAttestations(
final List<Attestation> attestations, final Optional<UInt64> maybeSlot) {
private UInt64 getSlot(final List<Attestation> attestations, final Optional<UInt64> maybeSlot) {
return maybeSlot.orElseGet(
() ->
attestations.stream()
Expand Down

0 comments on commit cbb3f88

Please sign in to comment.