Skip to content
Snippets Groups Projects
Commit ab559549 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

enh(sync): disabled sqlite check constraints in the nocautious mode

parent a12818a7
No related branches found
No related tags found
No related merge requests found
Pipeline #32253 passed with warnings
......@@ -183,8 +183,8 @@ export class Synchroniser extends stream.Duplex {
// We use cautious mode if it is asked, or not particulary asked but blockchain has been started
const cautious = askedCautious === true || localNumber >= 0;
// TODO Disable constraints
//if (!cautious) await this.server.dal.disableCheckConstraints();
// Disable check constraints
if (!cautious) await this.server.dal.disableCheckConstraints();
const milestonesStream = new ValidatorStream(
localNumber,
......@@ -244,8 +244,8 @@ export class Synchroniser extends stream.Duplex {
await this.syncStrategy.syncPeers(fullSync, to);
}
// TODO Enable constraints
//if (!cautious) await this.server.dal.enableCheckConstraints();
// Enable check constraints
if (!cautious) await this.server.dal.enableCheckConstraints();
const syncDuration = Date.now() - syncStartTime;
this.watcher.end(syncDuration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment