This commit is contained in:
Boog900 2024-11-10 21:20:42 +00:00
parent e652c189e5
commit 7c5fa6db20
No known key found for this signature in database
GPG key ID: 42AB1287CB0041C2
7 changed files with 12 additions and 22 deletions

2
Cargo.lock generated
View file

@ -551,7 +551,6 @@ version = "0.1.0"
dependencies = [
"borsh",
"cuprate-constants",
"cuprate-helper",
"cuprate-p2p-core",
"cuprate-pruning",
"cuprate-test-utils",
@ -881,7 +880,6 @@ dependencies = [
"futures",
"hex",
"hex-literal",
"serde",
"thiserror",
"tokio",
"tokio-stream",

View file

@ -20,7 +20,7 @@ cuprate-fixed-bytes = { workspace = true }
cuprate-levin = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p = { workspace = true }
cuprate-p2p-core = { workspace = true, features = ["serde"] }
cuprate-p2p-core = { workspace = true }
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
cuprate-async-buffer = { workspace = true }
cuprate-address-book = { workspace = true }

View file

@ -1,9 +1,12 @@
use cuprate_helper::fs::addressbook_path;
use cuprate_helper::network::Network;
use std::{
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
path::Path,
time::Duration,
};
use serde::{Deserialize, Serialize};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
use std::path::Path;
use std::time::Duration;
use cuprate_helper::{fs::addressbook_path, network::Network};
/// P2P config.
#[derive(Default, Deserialize, Serialize)]

View file

@ -1,6 +1,7 @@
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use cuprate_database::config::SyncMode;
use cuprate_database_service::ReaderThreads;
use cuprate_helper::fs::CUPRATE_DATA_DIR;

View file

@ -8,7 +8,6 @@ authors = ["Boog900"]
[dependencies]
cuprate-constants = { workspace = true }
cuprate-helper = { workspace = true, features = ["std"], optional = true }
cuprate-pruning = { workspace = true }
cuprate-p2p-core = { workspace = true, features = ["borsh"] }

View file

@ -28,7 +28,6 @@ tracing = { workspace = true, features = ["std", "attributes"] }
hex-literal = { workspace = true }
borsh = { workspace = true, features = ["derive", "std"], optional = true }
serde = { workspace = true, features = ["derive", "std"], optional = true }
[dev-dependencies]
cuprate-test-utils = { workspace = true }

View file

@ -1,5 +1,5 @@
use std::{
net::{IpAddr, Ipv4Addr, SocketAddr},
net::{IpAddr, SocketAddr},
pin::Pin,
task::{Context, Poll},
};
@ -38,20 +38,10 @@ impl NetZoneAddress for SocketAddr {
}
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", serde(deny_unknown_fields))]
pub struct ClearNetServerCfg {
pub ip: IpAddr,
}
impl Default for ClearNetServerCfg {
fn default() -> Self {
Self {
ip: IpAddr::V4(Ipv4Addr::UNSPECIFIED),
}
}
}
#[derive(Clone, Copy)]
pub enum ClearNet {}