Skip to content

Commit abb55fd

Browse files
committed
f Don't pin futures
1 parent c367f71 commit abb55fd

File tree

6 files changed

+9
-22
lines changed

6 files changed

+9
-22
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,34 @@ jobs:
2020
- toolchain: stable
2121
build-net-tokio: true
2222
build-no-std: true
23-
build-futures: true
2423
- toolchain: stable
2524
platform: macos-latest
2625
build-net-tokio: true
2726
build-no-std: true
28-
build-futures: true
2927
- toolchain: beta
3028
platform: macos-latest
3129
build-net-tokio: true
3230
build-no-std: true
33-
build-futures: true
3431
- toolchain: stable
3532
platform: windows-latest
3633
build-net-tokio: true
3734
build-no-std: true
38-
build-futures: true
3935
- toolchain: beta
4036
platform: windows-latest
4137
build-net-tokio: true
4238
build-no-std: true
43-
build-futures: true
4439
- toolchain: beta
4540
build-net-tokio: true
4641
build-no-std: true
47-
build-futures: true
4842
- toolchain: 1.41.1
4943
build-no-std: false
5044
test-log-variants: true
51-
build-futures: true
5245
- toolchain: 1.45.2
5346
build-net-old-tokio: true
5447
build-net-tokio: true
5548
build-no-std: false
56-
build-futures: true
5749
coverage: true
5850
- toolchain: 1.47.0
59-
build-futures: true
6051
build-no-std: true
6152
runs-on: ${{ matrix.platform }}
6253
steps:
@@ -146,7 +137,7 @@ jobs:
146137
cd lightning
147138
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no-std
148139
- name: Test futures builds on Rust ${{ matrix.toolchain }}
149-
if: "matrix.build-futures && !matrix.coverage"
140+
if: "!matrix.coverage"
150141
shell: bash # Default on Winblows is powershell
151142
run: |
152143
cd lightning-background-processor

lightning-background-processor/Cargo.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ edition = "2018"
1313
all-features = true
1414
rustdoc-args = ["--cfg", "docsrs"]
1515

16+
[features]
17+
futures = [ "futures-util" ]
18+
1619
[dependencies]
1720
bitcoin = "0.29.0"
1821
lightning = { version = "0.0.111", path = "../lightning", features = ["std"] }
1922
lightning-rapid-gossip-sync = { version = "0.0.111", path = "../lightning-rapid-gossip-sync" }
20-
futures = { version = "=0.3.17", optional = true }
21-
futures-core = { version = "=0.3.17", optional = true }
22-
futures-task = { version = "=0.3.17", optional = true }
23-
futures-channel = { version = "=0.3.17", optional = true }
24-
futures-executor = { version = "=0.3.17", optional = true }
25-
futures-io = { version = "=0.3.17", optional = true }
26-
futures-sink = { version = "=0.3.17", optional = true }
27-
futures-util = { version = "=0.3.17", optional = true }
23+
futures-util = { version = "0.3", default-features = true, optional = true }
2824

2925
[dev-dependencies]
3026
lightning = { version = "0.0.111", path = "../lightning", features = ["_test_utils"] }

lightning-background-processor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use std::time::{Duration, Instant};
3535
use std::ops::Deref;
3636

3737
#[cfg(feature = "futures")]
38-
use futures::{select, future::FutureExt};
38+
use futures_util::{select, future::FutureExt};
3939

4040
/// `BackgroundProcessor` takes care of tasks that (1) need to happen periodically to keep
4141
/// Rust-Lightning running properly, and (2) either can or should be run in the background. Its

lightning-block-sync/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rpc-client = [ "serde", "serde_json", "chunked_transfer" ]
2020
[dependencies]
2121
bitcoin = "0.29.0"
2222
lightning = { version = "0.0.111", path = "../lightning" }
23-
futures = { version = "0.3" }
23+
futures-util = { version = "0.3", default-features = true }
2424
tokio = { version = "1.0", features = [ "io-util", "net", "time" ], optional = true }
2525
serde = { version = "1.0", features = ["derive"], optional = true }
2626
serde_json = { version = "1.0", optional = true }

lightning-block-sync/src/rest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::http::{BinaryResponse, HttpEndpoint, HttpClient, JsonResponse};
77
use bitcoin::hash_types::BlockHash;
88
use bitcoin::hashes::hex::ToHex;
99

10-
use futures::lock::Mutex;
10+
use futures_util::lock::Mutex;
1111

1212
use std::convert::TryFrom;
1313
use std::convert::TryInto;

lightning-block-sync/src/rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::http::{HttpClient, HttpEndpoint, HttpError, JsonResponse};
77
use bitcoin::hash_types::BlockHash;
88
use bitcoin::hashes::hex::ToHex;
99

10-
use futures::lock::Mutex;
10+
use futures_util::lock::Mutex;
1111

1212
use serde_json;
1313

0 commit comments

Comments
 (0)