Skip to content

Commit 6ca3b8e

Browse files
committed
Add REST and RPC clients to lightning-block-sync
Implements a simple HTTP client that can issue GET and POST requests. Used to implement REST and RPC clients, respectively. Both clients support either blocking or non-blocking I/O.
1 parent 9860646 commit 6ca3b8e

File tree

5 files changed

+1043
-0
lines changed

5 files changed

+1043
-0
lines changed

lightning-block-sync/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ description = """
88
Utilities to fetch the chain data from a block source and feed them into Rust Lightning.
99
"""
1010

11+
[features]
12+
rest-client = [ "serde_json", "chunked_transfer" ]
13+
rpc-client = [ "serde_json", "chunked_transfer" ]
14+
1115
[dependencies]
1216
bitcoin = "0.24"
1317
lightning = { version = "0.0.12", path = "../lightning" }
18+
tokio = { version = "1.0", features = [ "io-util", "net" ], optional = true }
19+
serde_json = { version = "1.0", optional = true }
20+
chunked_transfer = { version = "1.4", optional = true }
21+
futures = { version = "0.3" }
22+
23+
[dev-dependencies]
24+
tokio = { version = "1.0", features = [ "macros", "rt" ] }

0 commit comments

Comments
 (0)