Use upstream version of multihash instead of a fork (#1472)

The changes from the libp2p fork have been backported to upstream, hence
upstream can now be used instead.
This commit is contained in:
Pierre Krieger
2020-03-05 16:49:36 +01:00
committed by GitHub
parent 8337687b3a
commit 10089c5f46
18 changed files with 59 additions and 806 deletions

View File

@ -557,7 +557,7 @@ impl fmt::Debug for MdnsPeer {
#[cfg(test)]
mod tests {
use futures::executor::block_on;
use libp2p_core::{PeerId, multiaddr::multihash::*};
use libp2p_core::{PeerId, multiaddr::multihash};
use std::{io::{Error, ErrorKind}, time::Duration};
use wasm_timer::ext::TryFutureExt;
use crate::service::{MdnsPacket, MdnsService};
@ -646,7 +646,7 @@ mod tests {
#[test]
fn discover_long_peer_id() {
let max_value = String::from_utf8(vec![b'f'; 42]).unwrap();
let hash = encode(Hash::Identity, max_value.as_ref()).unwrap();
let hash = multihash::Identity::digest(max_value.as_ref());
discover(PeerId::from_multihash(hash).unwrap())
}
}