Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit b812f21e authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] P2P sync now must be explicitely asked

parent 7f7d88a2
......@@ -19,6 +19,7 @@ export interface ProgramOptions {
notrim?: boolean
nosbx?: boolean
nopeers?: boolean
p2psync?: boolean
syncTrace?: string
isSync: boolean
noSources: boolean
......@@ -31,6 +32,7 @@ export const cliprogram: ProgramOptions = {
notrim: opts.notrim,
nosbx: opts.nosbx,
nopeers: opts.nopeers,
p2psync: opts.p2psync,
noSources: !!opts.nosources,
syncTrace: opts['sync-trace'],
isSync: opts._[0] === 'sync',
......@@ -76,6 +76,7 @@ export const CrawlerDependency = {
{ value: '--nocautious', desc: 'Do not check blocks validity during sync.'},
{ value: '--cautious', desc: 'Check blocks validity during sync (overrides --nocautious option).'},
{ value: '--nopeers', desc: 'Do not retrieve peers during sync.'},
{ value: '--p2psync', desc: 'Force P2P downloading of blocs during sync.'},
{ value: '--nosources', desc: 'Do not parse sources (UD, TX) during sync (debug purposes).'},
{ value: '--nosbx', desc: 'Do not retrieve sandboxes during sync.'},
{ value: '--onlypeers', desc: 'Will only try to sync peers.'},
......@@ -185,7 +185,7 @@ export class RemoteSynchronizer extends AbstractSynchronizer {
// Peers (just for P2P download)
let peers:(JSONDBPeer|null)[] = [];
if (!cliprogram.nopeers) {
if (cliprogram.p2psync) {
peers = await this.node.getPeers()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment