You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
accepted_oids?: Set<string>,// oids accepted for delegation by delegate
224
224
active_oids?: Set<string>// among those, oids currently activated for delegation by client
225
225
};
@@ -312,13 +312,6 @@ export class DataService implements OnDestroy {
312
312
313
313
delegation_agreements_caches: Record<string,Map<string,del_agreement_t>>;// by pid, did
314
314
315
-
direct_delegation_map_caches: Record<string,Map<string,Map<string,string>>>;// redundant storage of direct delegation data, not stored in database
316
-
inv_direct_delegation_map_caches: Record<string,Map<string,Map<string,Set<string>>>>;// redundant storage of inverse direct delegation data, not stored in database
317
-
indirect_delegation_map_caches: Record<string,Map<string,Map<string,Set<string>>>>;// redundant storage of indirect delegation data, not stored in database
318
-
inv_indirect_delegation_map_caches: Record<string,Map<string,Map<string,Set<string>>>>;// redundant storage of inverse indirect delegation data, not stored in database
319
-
effective_delegation_map_caches: Record<string,Map<string,Map<string,string>>>;// redundant storage of effective delegation data, not stored in database
320
-
inv_effective_delegation_map_caches: Record<string,Map<string,Map<string,Set<string>>>>;// redundant storage of inverse effective delegation data, not stored in database
321
-
322
315
tally_caches: Record<string,{}>;// temporary storage of tally data, not stored in database
323
316
324
317
news_keys: Set<string>;
@@ -436,12 +429,6 @@ export class DataService implements OnDestroy {
436
429
this.outgoing_dids_caches={};
437
430
this.incoming_dids_caches={};
438
431
this.delegation_agreements_caches={};
439
-
this.direct_delegation_map_caches={};
440
-
this.inv_direct_delegation_map_caches={};
441
-
this.indirect_delegation_map_caches={};
442
-
this.inv_indirect_delegation_map_caches={};
443
-
this.effective_delegation_map_caches={};
444
-
this.inv_effective_delegation_map_caches={};
445
432
this.proxy_ratings_map_caches={};
446
433
this.max_proxy_ratings_map_caches={};
447
434
this.argmax_proxy_ratings_map_caches={};
@@ -1522,7 +1509,9 @@ export class DataService implements OnDestroy {
1522
1509
}else{
1523
1510
this.G.L.error("DataService.setp change option attempted for existing entry",pid,key,value);
1524
1511
}
1525
-
}else{
1512
+
}elseif(key=='inverse_indirect_map'){
1513
+
returnthis._setp_in_polldb(pid,key,value);
1514
+
}else{
1526
1515
this.G.L.error("DataService.setp non-local attempted for non-draft poll",pid,key,value);
1527
1516
}
1528
1517
}
@@ -1568,7 +1557,7 @@ export class DataService implements OnDestroy {
1568
1557
// other polls' data is stored in poll's own database.
1569
1558
// construct key for poll db:
1570
1559
constpkey=this.get_voter_key_prefix(pid,vid)+key;
1571
-
// this.G.L.trace("getv", pid, key, vid, pkey)
1560
+
// this.G.L.trace("getv", pid, key, vid, pkey)
1572
1561
this.ensure_poll_cache(pid);
1573
1562
value=this.poll_caches[pid][pkey]||'';
1574
1563
}
@@ -1591,8 +1580,51 @@ export class DataService implements OnDestroy {
1591
1580
}
1592
1581
}
1593
1582
1594
-
delv(pid: string,key: string){
1595
-
// delete a voter data item
1583
+
// inverse_indirect_map:- key: voterid, value: [voterid1, voterid2, voterid3] voterids that have effectively delegated to the voterid
// direct_delegation_map:- key: voterid, value: [[voterid, rank, is_current_delegation], [voterid2, rank, is_current_delegate]] of the voter that the key has delegated to.
1605
+
// When ranked delegation is not allowed, the rank is always 0 and the size of the value is 1.
0 commit comments