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
......@@ -279,7 +279,9 @@ export class BlockGenerator {
const currentMembership = await this.dal.mindexDAL.getReducedMS(ms.issuer);
const currentMSN = currentMembership ? parseInt(currentMembership.created_on) : -1;
if (!join.identity.revoked && currentMSN < parseInt(join.ms.number)) {
preJoinData[join.identity.pubkey] = join;
if (!preJoinData[join.identity.pubkey] || preJoinData[join.identity.pubkey].certs.length < join.certs.length) {
preJoinData[join.identity.pubkey] = join;
}
}
} catch (err) {
if (err && !err.uerr) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment