Skip to content

Commit ad5ec1b

Browse files
committed
Replace cargo features with cfg-flags
1 parent e13d739 commit ad5ec1b

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ panic = 'abort' # Abort on panic
3030

3131
[features]
3232
default = []
33-
vss = []
34-
vss-test = []
3533

3634
[dependencies]
3735
lightning = { version = "0.0.118", features = ["max_level_trace", "std"] }

src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use bip39::Mnemonic;
4848

4949
use bitcoin::BlockHash;
5050

51-
#[cfg(feature = "vss")]
51+
#[cfg(any(vss, vss_test))]
5252
use crate::io::vss_store::VssStore;
5353
use std::convert::TryInto;
5454
use std::default::Default;
@@ -273,7 +273,7 @@ impl NodeBuilder {
273273

274274
/// Builds a [`Node`] instance with a [`VssStore`] backend and according to the options
275275
/// previously configured.
276-
#[cfg(feature = "vss")]
276+
#[cfg(any(vss, vss_test))]
277277
pub fn build_with_vss_store(
278278
&self, url: &str, store_id: String,
279279
) -> Result<Node<VssStore>, BuildError> {

src/io/vss_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct VssStore {
2121
}
2222

2323
impl VssStore {
24-
#[cfg(feature = "vss")]
24+
#[cfg(any(vss, vss_test))]
2525
pub(crate) fn new(base_url: &str, store_id: String) -> Self {
2626
let client = VssClient::new(base_url);
2727
let runtime = tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap();
@@ -182,7 +182,7 @@ impl KVStore for VssStore {
182182
impl RefUnwindSafe for VssStore {}
183183

184184
#[cfg(test)]
185-
#[cfg(feature = "vss-test")]
185+
#[cfg(vss_test)]
186186
mod tests {
187187
use super::*;
188188
use crate::io::test_utils::do_read_write_remove_list_persist;

src/test/functional_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn channel_full_cycle() {
1919
}
2020

2121
#[test]
22-
#[cfg(feature = "vss-test")]
22+
#[cfg(vss_test)]
2323
fn channel_full_cycle_with_vss_store() {
2424
let (bitcoind, electrsd) = setup_bitcoind_and_electrsd();
2525
println!("== Node A ==");

0 commit comments

Comments
 (0)