Skip to content

Commit b915777

Browse files
committed
review fixes
1 parent 6470c16 commit b915777

File tree

9 files changed

+11
-27
lines changed

9 files changed

+11
-27
lines changed

binaries/cuprated/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cuprate-p2p-core = { workspace = true }
2424
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
2525
cuprate-async-buffer = { workspace = true }
2626
cuprate-address-book = { workspace = true }
27-
cuprate-blockchain = { workspace = true, features = ["service"] }
27+
cuprate-blockchain = { workspace = true }
2828
cuprate-database-service = { workspace = true }
2929
cuprate-txpool = { workspace = true }
3030
cuprate-database = { workspace = true }

consensus/fast-sync/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "cuprate-fast-sync-create-hashes"
99
path = "src/create.rs"
1010

1111
[dependencies]
12-
cuprate-blockchain = { workspace = true, features = ["service"] }
12+
cuprate-blockchain = { workspace = true }
1313
cuprate-consensus = { workspace = true }
1414
cuprate-consensus-rules = { workspace = true }
1515
cuprate-consensus-context = { workspace = true }

storage/blockchain/Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,31 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/storage/cuprate-bloc
99
keywords = ["cuprate", "blockchain", "database"]
1010

1111
[features]
12-
default = ["heed", "service"]
12+
default = ["heed"]
1313
# default = ["redb", "service"]
1414
# default = ["redb-memory", "service"]
1515
heed = ["cuprate-database/heed"]
1616
redb = ["cuprate-database/redb"]
1717
redb-memory = ["cuprate-database/redb-memory"]
18-
service = ["dep:tower", "dep:thread_local", "dep:rayon", "dep:rand", "cuprate-helper/thread"]
1918
serde = ["dep:serde", "cuprate-database/serde", "cuprate-database-service/serde"]
2019

2120
[dependencies]
2221
cuprate-database = { workspace = true }
2322
cuprate-database-service = { workspace = true }
24-
cuprate-helper = { workspace = true, features = ["fs", "map", "crypto", "tx"] }
23+
cuprate-helper = { workspace = true, features = ["fs", "map", "crypto", "tx", "thread"] }
2524
cuprate-types = { workspace = true, features = ["blockchain"] }
2625
cuprate-pruning = { workspace = true }
2726

2827
bitflags = { workspace = true, features = ["std", "serde", "bytemuck"] }
2928
bytemuck = { workspace = true, features = ["must_cast", "derive", "min_const_generics", "extern_crate_alloc"] }
3029
curve25519-dalek = { workspace = true }
31-
rand = { workspace = true, features = ["std", "std_rng"], optional = true }
30+
rand = { workspace = true, features = ["std", "std_rng"] }
3231
monero-serai = { workspace = true, features = ["std"] }
3332
serde = { workspace = true, optional = true }
3433

35-
# `service` feature.
36-
tower = { workspace = true, optional = true }
37-
thread_local = { workspace = true, optional = true }
38-
rayon = { workspace = true, optional = true }
34+
tower = { workspace = true }
35+
thread_local = { workspace = true }
36+
rayon = { workspace = true }
3937

4038
[dev-dependencies]
4139
cuprate-constants = { workspace = true }

storage/blockchain/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ use cuprate_blockchain::{
3232
This ensures the types/traits used from `cuprate_database` are the same ones used by `cuprate_blockchain` internally.
3333

3434
# Feature flags
35-
The `service` module requires the `service` feature to be enabled.
36-
See the module for more documentation.
37-
3835
Different database backends are enabled by the feature flags:
3936
- `heed` (LMDB)
4037
- `redb`
@@ -45,7 +42,7 @@ The default is `heed`.
4542
<!-- FIXME: tracing should be behind a feature flag -->
4643

4744
# Invariants when not using `service`
48-
`cuprate_blockchain` can be used without the `service` feature enabled but
45+
`cuprate_blockchain` can be used without the `service` module but
4946
there are some things that must be kept in mind when doing so.
5047

5148
Failing to uphold these invariants may cause panics.

storage/blockchain/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ pub use free::open;
2929

3030
pub mod config;
3131
pub mod ops;
32+
pub mod service;
3233
pub mod tables;
3334
pub mod types;
3435

35-
//---------------------------------------------------------------------------------------------------- Feature-gated
36-
#[cfg(feature = "service")]
37-
pub mod service;
38-
3936
//---------------------------------------------------------------------------------------------------- Private
4037
#[cfg(test)]
4138
pub(crate) mod tests;
4239

43-
#[cfg(feature = "service")] // only needed in `service` for now
4440
pub(crate) mod unsafe_sendable;

storage/blockchain/src/service/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
//!
1111
//! The system is managed by this crate, and only requires [`init`] by the user.
1212
//!
13-
//! This module must be enabled with the `service` feature.
14-
//!
1513
//! ## Handles
1614
//! The 2 handles to the database are:
1715
//! - [`BlockchainReadHandle`]

storage/txpool/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ use cuprate_txpool::{
3737
This ensures the types/traits used from `cuprate_database` are the same ones used by `cuprate_txpool` internally.
3838

3939
# Feature flags
40-
41-
The `service` module requires the `service` feature to be enabled.
42-
See the module for more documentation.
43-
4440
Different database backends are enabled by the feature flags:
4541

4642
- `heed` (LMDB)

storage/txpool/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
clippy::significant_drop_tightening
55
)]
66

7+
// Used in docs: <https://github.com/Cuprate/cuprate/pull/170#discussion_r1823644357>.
78
use tower as _;
89

910
pub mod config;

storage/txpool/src/service.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
//!
1111
//! The system is managed by this crate, and only requires [`init`] by the user.
1212
//!
13-
//! This module must be enabled with the `service` feature.
14-
//!
1513
//! ## Handles
1614
//! The 2 handles to the database are:
1715
//! - [`TxpoolReadHandle`]

0 commit comments

Comments
 (0)