mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Upgrade to latest libp2p branch rev
This commit is contained in:
parent
5f70144c63
commit
f0a217b1e4
30
Cargo.lock
generated
30
Cargo.lock
generated
@ -1818,7 +1818,7 @@ checksum = "ba4aede83fc3617411dc6993bc8c70919750c1c257c6ca6a502aed6e0e2394ae"
|
||||
[[package]]
|
||||
name = "libp2p"
|
||||
version = "0.39.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"atomic",
|
||||
"bytes 1.0.1",
|
||||
@ -1846,7 +1846,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-core"
|
||||
version = "0.29.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"asn1_der",
|
||||
"bs58",
|
||||
@ -1879,7 +1879,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-dns"
|
||||
version = "0.29.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"libp2p-core",
|
||||
@ -1891,7 +1891,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-mplex"
|
||||
version = "0.29.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"asynchronous-codec",
|
||||
"bytes 1.0.1",
|
||||
@ -1908,7 +1908,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-noise"
|
||||
version = "0.32.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"curve25519-dalek",
|
||||
@ -1929,7 +1929,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-ping"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"libp2p-core",
|
||||
@ -1943,7 +1943,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-rendezvous"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"asynchronous-codec",
|
||||
"bimap",
|
||||
@ -1956,16 +1956,16 @@ dependencies = [
|
||||
"rand 0.8.3",
|
||||
"sha2 0.9.5",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"unsigned-varint 0.7.0",
|
||||
"uuid",
|
||||
"void",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libp2p-request-response"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
@ -1984,7 +1984,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-swarm"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"either",
|
||||
"futures",
|
||||
@ -1999,7 +1999,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-swarm-derive"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.73",
|
||||
@ -2008,7 +2008,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-tcp"
|
||||
version = "0.29.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"futures-timer",
|
||||
@ -2024,7 +2024,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-websocket"
|
||||
version = "0.30.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"either",
|
||||
"futures",
|
||||
@ -2041,7 +2041,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "libp2p-yamux"
|
||||
version = "0.33.0"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"libp2p-core",
|
||||
@ -2426,7 +2426,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
|
||||
[[package]]
|
||||
name = "multistream-select"
|
||||
version = "0.10.3"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=2e143a01aebbbf318231e7841884f9f34638c4e2#2e143a01aebbbf318231e7841884f9f34638c4e2"
|
||||
source = "git+https://github.com/comit-network/rust-libp2p?rev=4cacaf215b334d447faca8f4e361fe19c30d2162#4cacaf215b334d447faca8f4e361fe19c30d2162"
|
||||
dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"futures",
|
||||
|
@ -29,7 +29,7 @@ ecdsa_fun = { git = "https://github.com/LLFourn/secp256kfun", default-features =
|
||||
ed25519-dalek = "1"
|
||||
futures = { version = "0.3", default-features = false }
|
||||
itertools = "0.10"
|
||||
libp2p = { git = "https://github.com/comit-network/rust-libp2p", rev = "2e143a01aebbbf318231e7841884f9f34638c4e2", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous" ] }
|
||||
libp2p = { git = "https://github.com/comit-network/rust-libp2p", rev = "4cacaf215b334d447faca8f4e361fe19c30d2162", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous" ] }
|
||||
miniscript = { version = "5", features = [ "serde" ] }
|
||||
monero = { version = "0.12", features = [ "serde_support" ] }
|
||||
monero-rpc = { path = "../monero-rpc" }
|
||||
|
@ -169,20 +169,12 @@ where
|
||||
if let Some(rendezvous_reregister_timestamp) = self.rendezvous_reregister_timestamp {
|
||||
if Instant::now() > rendezvous_reregister_timestamp {
|
||||
if self.swarm.is_connected(&self.rendezvous_node_peer_id) {
|
||||
match self.swarm.behaviour_mut().rendezvous.register(
|
||||
self.swarm.behaviour_mut().rendezvous.register(
|
||||
Namespace::new(self.rendezvous_namespace.to_string())
|
||||
.expect("our namespace to be a correct string"),
|
||||
self.rendezvous_node_peer_id,
|
||||
None,
|
||||
) {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
tracing::error!(
|
||||
"Sending registration to rendezvous failed: {:#}",
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
match Swarm::dial_addr(&mut self.swarm, self.rendezvous_node_addr.clone()) {
|
||||
Ok(()) => {}
|
||||
@ -334,16 +326,11 @@ where
|
||||
}
|
||||
|
||||
if peer == self.rendezvous_node_peer_id {
|
||||
match self
|
||||
self
|
||||
.swarm
|
||||
.behaviour_mut()
|
||||
.rendezvous
|
||||
.register(Namespace::new(self.rendezvous_namespace.to_string()).expect("our namespace to be a correct string"), self.rendezvous_node_peer_id, None) {
|
||||
Ok(()) => {},
|
||||
Err(err) => {
|
||||
tracing::error!("Sending registration to rendezvous failed: {:#}", err);
|
||||
}
|
||||
}
|
||||
.register(Namespace::new(self.rendezvous_namespace.to_string()).expect("our namespace to be a correct string"), self.rendezvous_node_peer_id, None);
|
||||
}
|
||||
}
|
||||
Some(SwarmEvent::IncomingConnectionError { send_back_addr: address, error, .. }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user