Skip to content
Snippets Groups Projects

fix(1398): make sync with --onlypeers work again

Open pini requested to merge pini-sync-onlypeers into release/1.8
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
@@ -375,16 +375,19 @@ export class RemoteSynchronizer extends AbstractSynchronizer {
}
async syncPeers(fullSync: boolean, to?: number): Promise<void> {
if (!this.node) {
await this.init();
}
const peers = await this.node.getPeers();
for (let i = 0; i < peers.length; i++) {
const peer = PeerDTO.fromJSONObject(peers[i]);
this.watcher.writeStatus("Peer " + peer.pubkey);
this.watcher.peersPercent(Math.ceil((i / peers.length) * 100));
// this.watcher.writeStatus("Peer " + peer.pubkey);
// this.watcher.peersPercent(Math.ceil((i / peers.length) * 100));
try {
await this.PeeringService.submitP(DBPeer.fromPeerDTO(peer));
} catch (e) {}
}
this.watcher.peersPercent(100);
// this.watcher.peersPercent(100);
}
async syncSandbox(): Promise<void> {
Loading