mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-20 19:40:52 +00:00
Fix all the compilation issues.
This commit is contained in:
parent
0cb0b4f0d4
commit
5d0e16d978
@ -1650,7 +1650,7 @@ proc publishBlock*(
|
||||
|
||||
case strategy
|
||||
of ApiStrategyKind.First, ApiStrategyKind.Best:
|
||||
let res =
|
||||
let res = block:
|
||||
vc.firstSuccessParallel(RestPlainResponse, SlotDuration,
|
||||
{BeaconNodeRole.BlockProposalPublish}):
|
||||
case data.kind
|
||||
|
@ -89,7 +89,7 @@ proc serveAttestation(service: AttestationServiceRef, adata: AttestationData,
|
||||
|
||||
let res =
|
||||
try:
|
||||
await vc.submitPoolAttestations(@[attestation])
|
||||
await vc.submitPoolAttestations(@[attestation], ApiStrategyKind.First)
|
||||
except ValidatorApiError:
|
||||
error "Unable to publish attestation",
|
||||
attestation = shortLog(attestation),
|
||||
@ -175,7 +175,7 @@ proc serveAggregateAndProof*(service: AttestationServiceRef,
|
||||
|
||||
let res =
|
||||
try:
|
||||
await vc.publishAggregateAndProofs(@[signedProof])
|
||||
await vc.publishAggregateAndProofs(@[signedProof], ApiStrategyKind.First)
|
||||
except ValidatorApiError:
|
||||
error "Unable to publish aggregated attestation",
|
||||
attestation = shortLog(signedProof.message.aggregate),
|
||||
@ -215,7 +215,8 @@ proc produceAndPublishAttestations*(service: AttestationServiceRef,
|
||||
|
||||
# This call could raise ValidatorApiError, but it is handled in
|
||||
# publishAttestationsAndAggregates().
|
||||
let ad = await vc.produceAttestationData(slot, committee_index)
|
||||
let ad = await vc.produceAttestationData(slot, committee_index,
|
||||
ApiStrategyKind.Best)
|
||||
|
||||
let pendingAttestations =
|
||||
block:
|
||||
@ -298,7 +299,8 @@ proc produceAndPublishAggregates(service: AttestationServiceRef,
|
||||
if len(aggregateItems) > 0:
|
||||
let aggAttestation =
|
||||
try:
|
||||
await vc.getAggregatedAttestation(slot, attestationRoot)
|
||||
await vc.getAggregatedAttestation(slot, attestationRoot,
|
||||
ApiStrategyKind.Best)
|
||||
except ValidatorApiError:
|
||||
error "Unable to get aggregated attestation data", slot = slot,
|
||||
attestation_root = shortLog(attestationRoot)
|
||||
|
@ -55,7 +55,8 @@ proc publishBlock(vc: ValidatorClientRef, currentSlot, slot: Slot,
|
||||
|
||||
let beaconBlock =
|
||||
try:
|
||||
await vc.produceBlockV2(slot, randaoReveal, graffiti)
|
||||
await vc.produceBlockV2(slot, randaoReveal, graffiti,
|
||||
ApiStrategyKind.Best)
|
||||
except ValidatorApiError:
|
||||
error "Unable to retrieve block data", slot = slot,
|
||||
wall_slot = currentSlot, validator = shortLog(validator)
|
||||
@ -103,7 +104,7 @@ proc publishBlock(vc: ValidatorClientRef, currentSlot, slot: Slot,
|
||||
try:
|
||||
let signedBlock = ForkedSignedBeaconBlock.init(beaconBlock, blockRoot,
|
||||
signature)
|
||||
await vc.publishBlock(signedBlock)
|
||||
await vc.publishBlock(signedBlock, ApiStrategyKind.First)
|
||||
except ValidatorApiError:
|
||||
error "Unable to publish block",
|
||||
blockRoot = shortLog(blockRoot),
|
||||
|
@ -390,7 +390,8 @@ proc pollForAttesterDuties*(vc: ValidatorClientRef) {.async.} =
|
||||
res
|
||||
|
||||
if len(subscriptions) > 0:
|
||||
let res = await vc.prepareBeaconCommitteeSubnet(subscriptions)
|
||||
let res = await vc.prepareBeaconCommitteeSubnet(subscriptions,
|
||||
ApiStrategyKind.First)
|
||||
if not(res):
|
||||
error "Failed to subscribe validators"
|
||||
|
||||
@ -434,7 +435,8 @@ proc pollForSyncCommitteeDuties* (vc: ValidatorClientRef) {.async.} =
|
||||
res.add(sub)
|
||||
res
|
||||
if len(subscriptions) > 0:
|
||||
let res = await vc.prepareSyncCommitteeSubnets(subscriptions)
|
||||
let res = await vc.prepareSyncCommitteeSubnets(subscriptions,
|
||||
ApiStrategyKind.First)
|
||||
if not(res):
|
||||
error "Failed to subscribe validators"
|
||||
|
||||
|
@ -63,7 +63,7 @@ proc serveSyncCommitteeMessage*(service: SyncCommitteeServiceRef,
|
||||
|
||||
let res =
|
||||
try:
|
||||
await vc.submitPoolSyncCommitteeSignature(message)
|
||||
await vc.submitPoolSyncCommitteeSignature(message, ApiStrategyKind.First)
|
||||
except ValidatorApiError:
|
||||
error "Unable to publish sync committee message",
|
||||
message = shortLog(message),
|
||||
@ -177,7 +177,8 @@ proc serveContributionAndProof*(service: SyncCommitteeServiceRef,
|
||||
|
||||
let res =
|
||||
try:
|
||||
await vc.publishContributionAndProofs(@[restSignedProof])
|
||||
await vc.publishContributionAndProofs(@[restSignedProof],
|
||||
ApiStrategyKind.First)
|
||||
except ValidatorApiError as err:
|
||||
error "Unable to publish sync contribution",
|
||||
contribution = shortLog(proof.contribution),
|
||||
@ -240,7 +241,8 @@ proc produceAndPublishContributions(service: SyncCommitteeServiceRef,
|
||||
try:
|
||||
await vc.produceSyncCommitteeContribution(slot,
|
||||
item.subcommitteeIdx,
|
||||
beaconBlockRoot)
|
||||
beaconBlockRoot,
|
||||
ApiStrategyKind.Best)
|
||||
except ValidatorApiError:
|
||||
error "Unable to get sync message contribution data", slot = slot,
|
||||
beaconBlockRoot = shortLog(beaconBlockRoot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user