-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of libp2p
dependency in sc-authority-discovery
#5842
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Bastian Köcher <[email protected]>
This reverts commit 73860e6.
bot fmt |
@dmitry-markin https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7471948 was started for your command Comment |
@dmitry-markin Command |
@dmitry-markin , @bkchr , @lexnv , I think we're ready for a review. |
It seems that I cannot add new reviewers myself: I don't see the gear usuallly present on the right side of |
@@ -907,7 +907,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac | |||
); | |||
|
|||
self.event_streams.send(Event::Dht( | |||
DhtEvent::ValueNotFound(libp2p::kad::RecordKey::new(&key)) | |||
DhtEvent::ValueNotFound(sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are passing the same type as generic argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler complains that the type of sc_network_types::rec::Key::new
cannot be infered, and so passing the type as the generic fixed the problem.
Co-authored-by: Bastian Köcher <[email protected]>
Issue
#4859
Description
This PR removes
libp2p
types in authority-discovery, and replace them with network backend agnostic types fromsc-network-types
.The
sc-network
interface is therefore updated accordingly.