Skip to content
Snippets Groups Projects
Commit 12291f07 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] WS2P: the server may crash on startup if pulling a same block twice

parent 8b1bd907
No related branches found
No related tags found
No related merge requests found
......@@ -475,8 +475,12 @@ export class WS2PCluster {
const chosen = randomPick(connections, CrawlerConstants.CRAWL_PEERS_COUNT)
await Promise.all(chosen.map(async (conn) => {
try {
const puller = new WS2PBlockPuller(this.server, conn)
await puller.pull()
} catch (e) {
this.server.logger.warn(e)
}
}))
await this.server.BlockchainService.pushFIFO("WS2PCrawlerResolution", async () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment