Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[workspace]
members = ["accumulator", "hintfile", "network", "node"]
default-members = ["accumulator", "network"]
members = ["accumulator", "hintfile", "node"]
default-members = ["accumulator"]
resolver = "2"

[workspace.dependencies]
bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = false, rev = "16cc257c3695dea0e7301a5fa9cab44b8ed60598" }
kernel = { package = "bitcoinkernel", git = "https://github.com/alexanderwiederin/rust-bitcoinkernel.git", rev = "353533221e3ba91d672418eab1ae7b83a61214f9" }
p2p = { package = "bitcoin-p2p", git = "https://github.com/2140-dev/bitcoin-p2p.git", rev = "4f67fbeced98e3ddcc65a1333c46823a2b56332a" }
p2p = { package = "bitcoin-p2p", git = "https://github.com/2140-dev/bitcoin-p2p.git", rev = "44fbf6a50aec6cd8a30301deff438b7436069106" }
17 changes: 0 additions & 17 deletions network/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions network/README.md

This file was deleted.

228 changes: 0 additions & 228 deletions network/src/dns.rs

This file was deleted.

42 changes: 0 additions & 42 deletions network/src/lib.rs

This file was deleted.

28 changes: 0 additions & 28 deletions network/tests/test.rs

This file was deleted.

1 change: 0 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ accumulator = { path = "../accumulator/" }
bitcoin = { workspace = true }
kernel = { workspace = true }
hintfile = { path = "../hintfile/" }
network = { path = "../network/" }
p2p = { workspace = true }

configure_me = "0.4.0"
Expand Down
17 changes: 7 additions & 10 deletions node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{
collections::HashSet,
fs::File,
io::Write,
net::SocketAddr,
net::{IpAddr, Ipv4Addr, SocketAddr},
path::Path,
sync::{
mpsc::{Receiver, Sender},
Expand All @@ -21,16 +21,16 @@ use bitcoin::{
};
use hintfile::Hints;
use kernel::{ChainType, ChainstateManager};
use network::dns::DnsQuery;
use p2p::{
dns::DnsQueryExt,
handshake::ConnectionConfig,
net::{ConnectionExt, TimeoutParams},
p2p::{
message::{InventoryPayload, NetworkMessage},
message_blockdata::{GetHeadersMessage, Inventory},
NetworkExt, ProtocolVersion, ServiceFlags,
},
SeedsExt, TimedMessage,
TimedMessage,
};

const PROTOCOL_VERSION: ProtocolVersion = ProtocolVersion::WTXID_RELAY_VERSION;
Expand Down Expand Up @@ -64,14 +64,11 @@ impl AccumulatorState {
}

pub fn bootstrap_dns(network: Network) -> Vec<SocketAddr> {
let mut all_hosts = Vec::new();
for seed in network.seeds() {
let hosts = DnsQuery::new_cloudflare(seed).lookup().unwrap_or_default();
all_hosts.extend_from_slice(&hosts);
}
all_hosts
let cloudflare = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(1, 1, 1, 1)), 53);
network
.query_dns_seeds(cloudflare)
.into_iter()
.map(|host| SocketAddr::new(host, network.default_p2p_port()))
.map(|ip| SocketAddr::new(ip, network.default_p2p_port()))
.collect()
}

Expand Down
Loading