Skip to content
Snippets Groups Projects
Commit 15b82ed5 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Hotfix: blockchain was stuck due to the integration of invalid certifications

parent 30a91d07
Branches
Tags
No related merge requests found
......@@ -831,7 +831,7 @@ function BlockchainService (conf, mainDAL, pair) {
throw 'Too old certification';
}
// Already exists a link not replayable yet?
var exists = yield dal.existsLinkFromOrAfterDate(cert.from, cert.to, current.medianTime - conf.sigDelay);
var exists = yield dal.existsLinkFromOrAfterDate(cert.from, cert.to, current.medianTime - conf.sigDelay - conf.sigValidity);
if (exists) {
throw 'It already exists a similar certification written, which is not replayable yet';
}
......@@ -1445,7 +1445,7 @@ function NextBlockGenerator(conf, dal) {
var exists = false;
if (current) {
// Already exists a link not replayable yet?
exists = yield dal.existsLinkFromOrAfterDate(cert.from, cert.to, current.medianTime - conf.sigDelay);
exists = yield dal.existsLinkFromOrAfterDate(cert.from, cert.to, current.medianTime - conf.sigDelay - conf.sigValidity);
}
if (!exists) {
// It does NOT already exists a similar certification written, which is not replayable yet
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment