mirror of
https://github.com/hackku21/loc-chain-backend.git
synced 2024-10-27 20:34:03 +00:00
Better debugging for network access
This commit is contained in:
parent
63a172209c
commit
5555d63f5d
@ -323,14 +323,10 @@ export class Blockchain extends Unit {
|
|||||||
this.logging.debug({peers})
|
this.logging.debug({peers})
|
||||||
|
|
||||||
let longestChain: Block[] = []
|
let longestChain: Block[] = []
|
||||||
const chains = await Promise.all(
|
for ( const peer of peers ) {
|
||||||
peers.map(peer => this.getPeerSubmit(peer))
|
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 (
|
if (
|
||||||
chain
|
chain
|
||||||
&& chain.length > longestChain.length
|
&& chain.length > longestChain.length
|
||||||
|
Loading…
Reference in New Issue
Block a user