Some refactoring in network-bridge in the course of dealing with #2177 (#2263)
* More doc fixes. * Minor refactorings in the process of #2177 By having everything peer set related depend directly on the enum the code becomes more clear and it is also straight forward to add more peersets/protocols as the compiler will complain if you forget to implement parts of it. * Add peer set infos on startup properly For feature real_overseer. + Fixes from review. Thanks @coriolinus and @ordian ! * More structure in network-bridge Some changes, which would have helped me in groking the code faster. Entry points/public types more to the top. Factored out implementation in their own files, to clear up the top-level view. * Get rid of local ProtocolName type definition. Does not add much at this level. * Fix tests + import cleanup. * Make spaces tabs. * Clarify what correct parameters to send_message are * Be more less vague in docs of send_message. * Apply suggestions from code review Extend copyright on new files to 2021 as well. Co-authored-by:Andronik Ordian <write@reusable.software> Co-authored-by:
Andronik Ordian <write@reusable.software>
Showing
- polkadot/Cargo.lock 24 additions, 2 deletionspolkadot/Cargo.lock
- polkadot/node/network/bridge/src/action.rs 184 additions, 0 deletionspolkadot/node/network/bridge/src/action.rs
- polkadot/node/network/bridge/src/lib.rs 221 additions, 478 deletionspolkadot/node/network/bridge/src/lib.rs
- polkadot/node/network/bridge/src/network.rs 183 additions, 0 deletionspolkadot/node/network/bridge/src/network.rs
- polkadot/node/network/bridge/src/validator_discovery.rs 5 additions, 4 deletionspolkadot/node/network/bridge/src/validator_discovery.rs
- polkadot/node/network/protocol/Cargo.toml 1 addition, 0 deletionspolkadot/node/network/protocol/Cargo.toml
- polkadot/node/network/protocol/src/lib.rs 4 additions, 9 deletionspolkadot/node/network/protocol/src/lib.rs
- polkadot/node/network/protocol/src/peer_set.rs 90 additions, 0 deletionspolkadot/node/network/protocol/src/peer_set.rs
- polkadot/node/service/src/lib.rs 1 addition, 1 deletionpolkadot/node/service/src/lib.rs
- polkadot/roadmap/implementers-guide/src/node/utility/network-bridge.md 3 additions, 3 deletions...map/implementers-guide/src/node/utility/network-bridge.md
Please register or sign in to comment