-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: do not use features expect two base_url instead, and improv…
…e error handling - refactor and update http client, url usage and methods - refactor and add creation methods for cache struct, use specific method to build initial one - add `get_block_header` method in http client, and refactor lib to use `bitcoin::BlockHeader` instead of custom mempool.space `BlockExtended` struct - refactor lib and websocket to improve error handling, update some `unwrap()` usage and match errors for messages in `WebSocketStream` - remove duplicated/unused deps, and use only necessary features
- Loading branch information
1 parent
2b9e908
commit af3a572
Showing
8 changed files
with
387 additions
and
441 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ edition = "2021" | |
authors = ["Leonardo Souza <[email protected]>", "LLFourn <[email protected]>"] | ||
repository = "https://github.com/oleonardolima/block-events" | ||
description = "A real-time stream block events library, covering connected and disconnected blocks.\nThis a work in progress project for Summer of Bitcoin 2022." | ||
keywords = ["bitcoin", "blockchain", "blocks", "mempool-space", "stream", "events", "summer-of-bitcoin"] | ||
keywords = ["bitcoin", "blockchain", "blocks", "events", "mempool-space", "stream", "summer-of-bitcoin"] | ||
readme = "README.md" | ||
license = "MIT OR Apache-2.0" | ||
|
||
|
@@ -15,29 +15,20 @@ async-stream = { version = "0.3.3"} | |
bitcoin = { version = "0.28", features = ["use-serde", "base64"] } | ||
clap = { version = "3.0", features = ["derive"]} | ||
env_logger = { version = "0.9.0" } | ||
futures-core = { version = "0.3" } | ||
futures-util = { version = "0.3" } | ||
futures = { version = "0.3" } | ||
log = { version = "0.4" } | ||
reqwest = { version = "0.11.11" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = { version = "1.0" } | ||
tokio = { version = "1.19.2", features = ["io-util", "io-std", "macros", "net", "rt-multi-thread", "time"] } | ||
tokio-stream = { version = "0.1.9" } | ||
tokio = { version = "1.19.2", features = ["macros", "rt-multi-thread"] } | ||
tokio-tungstenite = { version = "0.17.1", features = ["connect", "native-tls"]} | ||
url = { version = "2.0.0" } | ||
reqwest = { version = "0.11.11" } | ||
|
||
[dev-dependencies] | ||
testcontainers = { version = "^0.14.0" } | ||
bitcoind = { version = "^0.26.1", features = ["22_0"] } | ||
electrsd = { version = "^0.19.1", features = ["bitcoind_22_0", "electrs_0_9_1"] } | ||
serial_test = { version = "0.7.0" } | ||
|
||
[features] | ||
default = ["mempool-backend"] | ||
tls-secure = [] | ||
esplora-backend = [] | ||
mempool-backend = [] | ||
|
||
[lib] | ||
name = "block_events" | ||
path = "src/lib.rs" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.