mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-23 12:16:25 +00:00
a4b92cd3b6c6c2f069e0a7e4469b3372bc9dcfc3
* Make sure validator discovery works with a delayed peer to validator mapping Currently the implementation checks on connect of a peer if this peer is a validator by asking the authority discovery. It can now happen that the authority discovery is not yet aware that a given peer is an authority. This can for example happen on start up of the node. This pr changes the behavior, to make it possible to later associate a peer to a validator id. Instead of just storing the connected validators, we now store all connected peers with a vector of associated validator ids. When we get a request to connect to a given given set of validators, we start by checking the connected peers. If we didn't find a validator id in the connected peers, we ask the authority discovery for the peerid of a given authority id. When the returned peerid is part of our connected peers set, we cache and return the authority id. * Update node/network/bridge/Cargo.toml Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * Update node/network/bridge/src/validator_discovery.rs Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * Update `Cargo.lock` Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Languages
Rust
99.8%
Shell
0.2%