authority-discovery: Support multiple authority ids per peer id (#10259)
* authority-discovery: Support multiple authority ids per peer id An peer id can be mapped to multiple authority ids, because an authority id is a session key that could be changed every session. Before this pr the internal authority discovery cache assumed that each authority id can only be mapped to one peer id. However, this isn't true since we changed the default implementation of the authority discovery to combine the current and next session authorities. * Review feedback * Update client/authority-discovery/src/worker/addr_cache.rs Co-authored-by:Andronik Ordian <write@reusable.software> * Early return on no peer ids * Update client/authority-discovery/src/worker/addr_cache.rs Co-authored-by:
Pierre Krieger <pierre.krieger1708@gmail.com> * Update types in comment * FMT * Add warning * Update client/authority-discovery/src/worker/addr_cache.rs Co-authored-by:
Andronik Ordian <write@reusable.software> * Feedback Co-authored-by:
Andronik Ordian <write@reusable.software> Co-authored-by:
Pierre Krieger <pierre.krieger1708@gmail.com>
Showing
- substrate/client/authority-discovery/src/lib.rs 7 additions, 4 deletionssubstrate/client/authority-discovery/src/lib.rs
- substrate/client/authority-discovery/src/service.rs 7 additions, 4 deletionssubstrate/client/authority-discovery/src/service.rs
- substrate/client/authority-discovery/src/tests.rs 4 additions, 4 deletionssubstrate/client/authority-discovery/src/tests.rs
- substrate/client/authority-discovery/src/worker.rs 4 additions, 4 deletionssubstrate/client/authority-discovery/src/worker.rs
- substrate/client/authority-discovery/src/worker/addr_cache.rs 148 additions, 94 deletions...trate/client/authority-discovery/src/worker/addr_cache.rs
- substrate/client/authority-discovery/src/worker/tests.rs 3 additions, 2 deletionssubstrate/client/authority-discovery/src/worker/tests.rs
Please register or sign in to comment