From 6b0e1a51b51aa772ebb2827364123312ced56707 Mon Sep 17 00:00:00 2001 From: VandeurenGlenn Date: Fri, 26 Apr 2024 16:09:51 +0200 Subject: [PATCH] chain: timeout poolsync --- packages/chain/src/chain.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/chain/src/chain.ts b/packages/chain/src/chain.ts index 167a31dc..a2008225 100644 --- a/packages/chain/src/chain.ts +++ b/packages/chain/src/chain.ts @@ -227,8 +227,10 @@ export default class Chain extends VersionControl { } else if (!this.knownBlocks) this.knownBlocks = await this.#makeRequest(peer, 'knownBlocks') } - const peerTransactionPool = (higherThenCurrentLocal && (await this.getPeerTransactionPool(peer))) || [] - if (this.#participating && peerTransactionPool.length > 0) return this.#runEpoch() + setTimeout(async () => { + const peerTransactionPool = (higherThenCurrentLocal && (await this.getPeerTransactionPool(peer))) || [] + if (this.#participating && peerTransactionPool.length > 0) return this.#runEpoch() + }, 3000) } #epochTimeout