From 5555d63f5dcb3a2e46c9fca20f5f228b4979ca2c Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sat, 10 Apr 2021 23:42:21 -0500 Subject: [PATCH] Better debugging for network access --- src/app/units/Blockchain.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/units/Blockchain.ts b/src/app/units/Blockchain.ts index 9252ce7..389c21a 100644 --- a/src/app/units/Blockchain.ts +++ b/src/app/units/Blockchain.ts @@ -323,14 +323,10 @@ export class Blockchain extends Unit { this.logging.debug({peers}) let longestChain: Block[] = [] - const chains = await Promise.all( - peers.map(peer => this.getPeerSubmit(peer)) - ) + for ( const peer of peers ) { + const chain = await this.getPeerSubmit(peer) + console.log('got chain', chain) - this.logging.debug('Got peer chain info:') - this.logging.debug(chains) - - for ( const chain of chains ) { if ( chain && chain.length > longestChain.length