Update to libp2p 0.12 (#3408)

This commit is contained in:
Pierre Krieger
2019-08-15 16:41:39 +02:00
committed by Gavin Wood
parent 6a7a222882
commit be732a2d68
10 changed files with 122 additions and 152 deletions
+5 -5
View File
@@ -17,21 +17,21 @@
//! Network event types. These are are not the part of the protocol, but rather
//! events that happen on the network like DHT get/put results received.
use libp2p::multihash::Multihash;
use libp2p::kad::record::Key;
/// Events generated by DHT as a response to get_value and put_value requests.
pub enum DhtEvent {
/// The value was found.
ValueFound(Vec<(Multihash, Vec<u8>)>),
ValueFound(Vec<(Key, Vec<u8>)>),
/// The requested record has not been found in the DHT.
ValueNotFound(Multihash),
ValueNotFound(Key),
/// The record has been successfully inserted into the DHT.
ValuePut(Multihash),
ValuePut(Key),
/// An error has occured while putting a record into the DHT.
ValuePutFailed(Multihash),
ValuePutFailed(Key),
}
/// Type for events generated by networking layer.