Skip to content
Merged
36 changes: 19 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ant-node"
version = "0.10.1"
version = "0.11.0"
edition = "2021"
authors = ["David Irvine <david.irvine@maidsafe.net>"]
description = "Pure quantum-proof network node for the Autonomi decentralized network"
Expand All @@ -24,7 +24,7 @@ path = "src/bin/ant-devnet/main.rs"

[dependencies]
# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = { git = "https://github.com/saorsa-labs/saorsa-core.git", branch = "mick/always-masque-relay-rebased" }
saorsa-core = "0.24.0"
saorsa-pqc = "0.5"

# Payment verification - autonomi network lookup + EVM payment
Expand Down
5 changes: 5 additions & 0 deletions src/devnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ impl Devnet {
*node.state.write().await = NodeState::Running;

if let (Some(ref p2p), Some(ref protocol)) = (&node.p2p_node, &node.ant_protocol) {
// Wire the P2PNode into the payment verifier for merkle-closeness checks.
protocol
.payment_verifier_arc()
.attach_p2p_node(Arc::clone(p2p));

let mut events = p2p.subscribe_events();
let p2p_clone = Arc::clone(p2p);
let protocol_clone = Arc::clone(protocol);
Expand Down
9 changes: 9 additions & 0 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ impl NodeBuilder {

let p2p_arc = Arc::new(p2p_node);

// Wire the P2PNode handle into the payment verifier so merkle-payment
// checks can query the live DHT for peers actually closest to a pool
// midpoint (pay-yourself defence).
if let Some(ref protocol) = ant_protocol {
protocol
.payment_verifier_arc()
.attach_p2p_node(Arc::clone(&p2p_arc));
}

// Initialize replication engine (if storage is enabled)
let replication_engine =
if let (Some(ref protocol), Some(fresh_rx)) = (&ant_protocol, fresh_write_rx) {
Expand Down
Loading
Loading