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

[fix] #1246 Concurrent identities: keep only the most signed one

parent d7988cc2
No related branches found
Tags
3 merge requests!12331.6,!12291.6 into DockerBuild,!12251.6 fixes
...@@ -279,8 +279,10 @@ export class BlockGenerator { ...@@ -279,8 +279,10 @@ export class BlockGenerator {
const currentMembership = await this.dal.mindexDAL.getReducedMS(ms.issuer); const currentMembership = await this.dal.mindexDAL.getReducedMS(ms.issuer);
const currentMSN = currentMembership ? parseInt(currentMembership.created_on) : -1; const currentMSN = currentMembership ? parseInt(currentMembership.created_on) : -1;
if (!join.identity.revoked && currentMSN < parseInt(join.ms.number)) { if (!join.identity.revoked && currentMSN < parseInt(join.ms.number)) {
if (!preJoinData[join.identity.pubkey] || preJoinData[join.identity.pubkey].certs.length < join.certs.length) {
preJoinData[join.identity.pubkey] = join; preJoinData[join.identity.pubkey] = join;
} }
}
} catch (err) { } catch (err) {
if (err && !err.uerr) { if (err && !err.uerr) {
this.logger.warn(err); this.logger.warn(err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment