Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build_electrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,32 @@ jobs:
with:
name: electrs_${{ env.RUNNER_OS_LOWER }}_esplora_${{ env.ELECTRS_COMMIT }}
path: target/release/electrs

build-electrs-esplora-pr108:
name: Build Electrs Esplora PR108
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15]
env:
ELECTRS_COMMIT: "d036fb8f327d6676f3160da1ec140a4f8aee8940"

steps:
- name: Check out Electrs (PR108)
uses: actions/checkout@master
with:
repository: Blockstream/electrs
ref: ${{ env.ELECTRS_COMMIT }}
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- name: downcase runner.os
run: |
echo ${{ runner.os }} \
| tr '[:upper:]' '[:lower:]' \
| echo RUNNER_OS_LOWER=$(</dev/stdin) >>${GITHUB_ENV}
- name: Upload libs for Esplora PR108
uses: actions/upload-artifact@v4
with:
name: electrs_${{ env.RUNNER_OS_LOWER }}_esplora_${{ env.ELECTRS_COMMIT }}
path: target/release/electrs
4 changes: 3 additions & 1 deletion .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ jobs:
CARGO_TERM_COLOR: always
strategy:
matrix:
features: ["corepc-node_22_1,legacy,esplora_a33e97e1"]
features:
- corepc-node_22_1,legacy,esplora_a33e97e1
- corepc-node_22_1,legacy,esplora_d036fb8f

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ legacy = []
# download is not supposed to be used directly only through selecting one of the version feature
download = ["bitcoin_hashes", "zip", "minreq"]

esplora_d036fb8f = ["download"]
esplora_a33e97e1 = ["download"]
electrs_0_8_10 = ["download"]
electrs_0_9_1 = ["download"]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ I used integration testing based on external bash script launching needed extern
* [electrs 0.9.11](https://github.com/romanz/electrs/releases/tag/v0.9.11) (feature=electrs_0_9_11)
* [electrs 0.9.1](https://github.com/romanz/electrs/releases/tag/v0.9.1) (feature=electrs_0_9_1)
* [electrs 0.8.10](https://github.com/romanz/electrs/releases/tag/v0.8.10) (feature=electrs_0_8_10)
* [electrs esplora](https://github.com/Blockstream/electrs/tree/a33e97e1a1fc63fa9c20a116bb92579bbf43b254) (feature=esplora_a33e97e1)
* [esplora a33e97e1](https://github.com/Blockstream/electrs/tree/a33e97e1a1fc63fa9c20a116bb92579bbf43b254) (feature=esplora_a33e97e1)
* [esplora d036fb8f](https://github.com/Blockstream/electrs/tree/d036fb8f327d6676f3160da1ec140a4f8aee8940)
(feature=esplora_d036fb8f)

Thanks to these features every `#[test]` could easily run isolated with its own environment

Expand Down
2 changes: 2 additions & 0 deletions sha256
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2d5ff149e8a2482d3658e9b386830dfc40c8fbd7c175ca7cbac58240a9505bcd electrs_macos_esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254.zip
865e26a96e8df77df01d96f2f569dcf9622fc87a8d99a9b8fe30861a4db9ddf1 electrs_linux_esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254.zip
ad495a79f56f40dfd16964f8df240b2d7a250bd52a8d024c438e7da95e123491 electrs_macos_esplora_d036fb8f327d6676f3160da1ec140a4f8aee8940.zip
5d6b69083834ba23c6312e4ecf8245ce8f800d96d47db6c9b13a432914ae94b3 electrs_linux_esplora_d036fb8f327d6676f3160da1ec140a4f8aee8940.zip
0459d493d399bdb9ef145c84125c3cd26c1993a48efe59fa9d3fa13a03b2f555 electrs_linux_v0.8.10.zip
48c857ca953ea66ee31c4da5a801298c85815e792ab57291107e77a4871d5421 electrs_macos_v0.8.10.zip
fee5cc9b6c8bbd3adc45c63c881844d948c1b4dd6817f99ee087a0ccc4ba3be0 electrs_linux_v0.9.1.zip
Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl Default for Conf<'_> {
let args = if cfg!(feature = "electrs_0_9_1")
|| cfg!(feature = "electrs_0_8_10")
|| cfg!(feature = "esplora_a33e97e1")
|| cfg!(feature = "esplora_d036fb8f")
|| cfg!(feature = "legacy")
{
vec!["-vvv"]
Expand Down Expand Up @@ -218,6 +219,7 @@ impl ElectrsD {
let p2p_socket;
if cfg!(feature = "electrs_0_8_10")
|| cfg!(feature = "esplora_a33e97e1")
|| cfg!(feature = "esplora_d036fb8f")
|| cfg!(feature = "legacy")
{
args.push("--jsonrpc-import");
Expand Down Expand Up @@ -444,7 +446,10 @@ mod test {
debug!("electrs: {}", &electrs_exe);
let mut conf = corepc_node::Conf::default();
conf.view_stdout = log_enabled!(Level::Debug);
if !cfg!(feature = "electrs_0_8_10") && !cfg!(feature = "esplora_a33e97e1") {
if !cfg!(feature = "electrs_0_8_10")
&& !cfg!(feature = "esplora_a33e97e1")
&& !cfg!(feature = "esplora_d036fb8f")
{
conf.p2p = P2P::Yes;
}
let bitcoind = corepc_node::Node::with_conf(&bitcoind_exe, &conf).unwrap();
Expand Down
5 changes: 5 additions & 0 deletions src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const VERSION: &str = "v0.8.10";
#[cfg(feature = "esplora_a33e97e1")]
const VERSION: &str = "esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254";

#[cfg(feature = "esplora_d036fb8f")]
const VERSION: &str = "esplora_d036fb8f327d6676f3160da1ec140a4f8aee8940";

#[cfg(feature = "electrs_0_9_1")]
const VERSION: &str = "v0.9.1";

Expand All @@ -28,6 +31,7 @@ const VERSION: &str = "v0.10.6";
feature = "electrs_0_9_11",
feature = "electrs_0_10_6",
feature = "esplora_a33e97e1",
feature = "esplora_d036fb8f",
)))]
const VERSION: &str = "NA";

Expand All @@ -37,6 +41,7 @@ pub const HAS_FEATURE: bool = cfg!(any(
feature = "electrs_0_9_11",
feature = "electrs_0_10_6",
feature = "esplora_a33e97e1",
feature = "esplora_d036fb8f",
));

pub fn electrs_name() -> String {
Expand Down