From 183f46573b1d9b8ff18422f846f4db990dc36849 Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 9 Dec 2020 08:27:12 +0000 Subject: [PATCH] Import AbortSignal wherever used --- packages/lodestar-validator/src/api/LocalClock.ts | 1 + packages/lodestar-validator/src/util/misc.ts | 2 ++ packages/lodestar/src/chain/blocks/processor.ts | 1 + packages/lodestar/src/chain/clock/LocalClock.ts | 1 + packages/lodestar/src/chain/eventHandlers.ts | 1 + packages/lodestar/src/chain/regen/queued.ts | 1 + packages/lodestar/src/util/queue.ts | 1 + 7 files changed, 8 insertions(+) diff --git a/packages/lodestar-validator/src/api/LocalClock.ts b/packages/lodestar-validator/src/api/LocalClock.ts index ae0d24125653..bf11b884def2 100644 --- a/packages/lodestar-validator/src/api/LocalClock.ts +++ b/packages/lodestar-validator/src/api/LocalClock.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import {Epoch, Slot} from "@chainsafe/lodestar-types"; import {IBeaconConfig} from "@chainsafe/lodestar-config"; import {computeEpochAtSlot, getCurrentSlot} from "@chainsafe/lodestar-beacon-state-transition"; diff --git a/packages/lodestar-validator/src/util/misc.ts b/packages/lodestar-validator/src/util/misc.ts index f81717e2083c..180438cec000 100644 --- a/packages/lodestar-validator/src/util/misc.ts +++ b/packages/lodestar-validator/src/util/misc.ts @@ -1,3 +1,5 @@ +import {AbortSignal} from "abort-controller"; + export function sleep(ms: number): Promise { return new Promise((resolve) => setTimeout(resolve, ms)); } diff --git a/packages/lodestar/src/chain/blocks/processor.ts b/packages/lodestar/src/chain/blocks/processor.ts index 38abf6e8e161..f7b5fd3c58f3 100644 --- a/packages/lodestar/src/chain/blocks/processor.ts +++ b/packages/lodestar/src/chain/blocks/processor.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import {IBeaconConfig} from "@chainsafe/lodestar-config"; import {IForkChoice} from "@chainsafe/lodestar-fork-choice"; diff --git a/packages/lodestar/src/chain/clock/LocalClock.ts b/packages/lodestar/src/chain/clock/LocalClock.ts index 476be10ed191..40d002cc3e71 100644 --- a/packages/lodestar/src/chain/clock/LocalClock.ts +++ b/packages/lodestar/src/chain/clock/LocalClock.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import {Epoch, Slot} from "@chainsafe/lodestar-types"; import {IBeaconConfig} from "@chainsafe/lodestar-config"; import {ErrorAborted} from "@chainsafe/lodestar-utils"; diff --git a/packages/lodestar/src/chain/eventHandlers.ts b/packages/lodestar/src/chain/eventHandlers.ts index d16caa1bfd49..47dd9ce93baf 100644 --- a/packages/lodestar/src/chain/eventHandlers.ts +++ b/packages/lodestar/src/chain/eventHandlers.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import {readOnlyMap, toHexString} from "@chainsafe/ssz"; import {Attestation, Checkpoint, SignedBeaconBlock, Slot, Version} from "@chainsafe/lodestar-types"; import {ILogger} from "@chainsafe/lodestar-utils"; diff --git a/packages/lodestar/src/chain/regen/queued.ts b/packages/lodestar/src/chain/regen/queued.ts index 202ce3789bf2..f3f95392171f 100644 --- a/packages/lodestar/src/chain/regen/queued.ts +++ b/packages/lodestar/src/chain/regen/queued.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import {BeaconBlock, Root, Checkpoint, Slot} from "@chainsafe/lodestar-types"; import {IBeaconConfig} from "@chainsafe/lodestar-config"; import {IForkChoice} from "@chainsafe/lodestar-fork-choice"; diff --git a/packages/lodestar/src/util/queue.ts b/packages/lodestar/src/util/queue.ts index c77386508922..eed3807702db 100644 --- a/packages/lodestar/src/util/queue.ts +++ b/packages/lodestar/src/util/queue.ts @@ -1,3 +1,4 @@ +import {AbortSignal} from "abort-controller"; import pushable, {Pushable} from "it-pushable"; import pipe from "it-pipe";