Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 9e2b8b6

Browse files
author
Tobin C. Harding
committed
Move comit transport to cnd/
1 parent 2600c63 commit 9e2b8b6

File tree

7 files changed

+5
-7
lines changed

7 files changed

+5
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cnd/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ hyper = "0.12"
3636
lazy_static = "1"
3737
libp2p = { version = "0.13" }
3838
libp2p-comit = { path = "../libp2p-comit" }
39+
libp2p-core = "0.13"
3940
libsqlite3-sys = { version = ">=0.8.0, <0.13.0", features = ["bundled"] }
4041
log = { version = "0.4", features = ["serde"] }
4142
maplit = "1"

cnd/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use cnd::{
88
db::{DetermineTypes, Retrieve, Saver, Sqlite},
99
http_api::{self, route_factory},
1010
load_swaps,
11-
network::{self, Network, SendRequest},
11+
network::{self, transport, Network, SendRequest},
1212
seed::{Seed, SwapSeed},
1313
swap_protocols::{
1414
rfc003::{
@@ -24,7 +24,6 @@ use libp2p::{
2424
identity::{self, ed25519},
2525
PeerId, Swarm,
2626
};
27-
use libp2p_comit;
2827
use rand::rngs::OsRng;
2928
use std::{
3029
net::SocketAddr,
@@ -85,7 +84,7 @@ fn main() -> anyhow::Result<()> {
8584
.compat(),
8685
)?;
8786

88-
let transport = libp2p_comit::build_comit_transport(local_key_pair);
87+
let transport = transport::build_comit_transport(local_key_pair);
8988
let behaviour = network::ComitNode::new(
9089
ledger_events.clone(),
9190
Arc::clone(&state_store),

cnd/src/network/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub mod send_request;
2+
pub mod transport;
23

34
pub use send_request::*;
45

File renamed without changes.

libp2p-comit/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ description = "Implementation of the COMIT messaging protocol"
99
bytes = "0.4"
1010
derivative = "1.0.3"
1111
futures = "0.1"
12-
libp2p = "0.13"
1312
libp2p-core = "0.13"
1413
libp2p-swarm = "0.3"
1514
log = "0.4"

libp2p-comit/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mod protocol;
99
mod substream;
1010
#[cfg(test)]
1111
pub mod test_harness;
12-
mod transport;
1312

1413
use serde::{Deserialize, Serialize};
1514
use serde_json::{self, Value as JsonValue};
@@ -18,7 +17,6 @@ pub use self::{
1817
behaviour::{BehaviourOutEvent, Comit},
1918
handler::{ComitHandler, PendingInboundRequest, PendingOutboundRequest},
2019
protocol::{ComitProtocolConfig, Frames},
21-
transport::build_comit_transport,
2220
};
2321
use crate::handler::{ProtocolOutEvent, ProtocolOutboundOpenInfo};
2422
use libp2p_swarm::ProtocolsHandlerEvent;

0 commit comments

Comments
 (0)