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

[fix] #1379: missing code

parent 37ad8da5
No related branches found
No related tags found
No related merge requests found
......@@ -227,13 +227,16 @@ export class IdentityService extends FIFOService {
written_hash: null,
block: cert.block_number
}
if (current && mCert.expires_on < current.medianTime) {
throw DataErrors[DataErrors.CERT_WINDOW_IS_PASSED]
}
let existingCert = await this.dal.existsCert(mCert, current)
if (!existingCert) {
if (!(await this.dal.certDAL.getSandboxForKey(cert.from).acceptNewSandBoxEntry(mCert, this.conf.pair && this.conf.pair.pub))) {
throw constants.ERRORS.SANDBOX_FOR_CERT_IS_FULL;
}
await this.dal.registerNewCertification(mCert)
this.logger.info('✔ CERT %s', mCert.from);
this.logger.info('✔ CERT %s block#%s -> %s', cert.from, cert.block_number, idty.uid)
} else {
throw constants.ERRORS.ALREADY_UP_TO_DATE;
}
......
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