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

[enh] logging: failure details for identity while coming to mempool

parent a260d458
No related branches found
No related tags found
No related merge requests found
...@@ -119,6 +119,7 @@ export class IdentityService extends FIFOService { ...@@ -119,6 +119,7 @@ export class IdentityService extends FIFOService {
const hash = idtyObj.getHash() const hash = idtyObj.getHash()
return this.pushFIFO<DBIdentity>(hash, async () => { return this.pushFIFO<DBIdentity>(hash, async () => {
this.logger.info('⬇ IDTY %s %s', idty.pubkey, idty.uid); this.logger.info('⬇ IDTY %s %s', idty.pubkey, idty.uid);
try {
// Check signature's validity // Check signature's validity
let verified = verify(createIdentity, idty.sig, idty.pubkey); let verified = verify(createIdentity, idty.sig, idty.pubkey);
if (!verified) { if (!verified) {
...@@ -162,6 +163,10 @@ export class IdentityService extends FIFOService { ...@@ -162,6 +163,10 @@ export class IdentityService extends FIFOService {
this.logger.info('✔ IDTY %s %s', idty.pubkey, idty.uid); this.logger.info('✔ IDTY %s %s', idty.pubkey, idty.uid);
return toSave return toSave
} }
} catch (e) {
this.logger.info('✘ IDTY %s %s', idty.pubkey, idty.uid);
throw e
}
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment