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 { ...@@ -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 // We use cautious mode if it is asked, or not particulary asked but blockchain has been started
const cautious = askedCautious === true || localNumber >= 0; const cautious = askedCautious === true || localNumber >= 0;
// TODO Disable constraints // Disable check constraints
//if (!cautious) await this.server.dal.disableCheckConstraints(); if (!cautious) await this.server.dal.disableCheckConstraints();
const milestonesStream = new ValidatorStream( const milestonesStream = new ValidatorStream(
localNumber, localNumber,
...@@ -244,8 +244,8 @@ export class Synchroniser extends stream.Duplex { ...@@ -244,8 +244,8 @@ export class Synchroniser extends stream.Duplex {
await this.syncStrategy.syncPeers(fullSync, to); await this.syncStrategy.syncPeers(fullSync, to);
} }
// TODO Enable constraints // Enable check constraints
//if (!cautious) await this.server.dal.enableCheckConstraints(); if (!cautious) await this.server.dal.enableCheckConstraints();
const syncDuration = Date.now() - syncStartTime; const syncDuration = Date.now() - syncStartTime;
this.watcher.end(syncDuration); this.watcher.end(syncDuration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment