Skip to content

Commit

Permalink
Merge pull request fedimint#5813 from dpc/24-08-08-fix-esplora
Browse files Browse the repository at this point in the history
fix: esplora bitcoin backend returning reverse network hash / wrong network
  • Loading branch information
bradleystachurski authored Aug 9, 2024
2 parents 374e294 + 105f2f1 commit 193df54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fedimint-bitcoind/src/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use fedimint_core::task::TaskHandle;
use fedimint_core::txoproof::TxOutProof;
use fedimint_core::util::SafeUrl;
use fedimint_core::{apply, async_trait_maybe_send, Feerate};
use hex::ToHex;
use tracing::{info, warn};

use crate::{DynBitcoindRpc, IBitcoindRpc, IBitcoindRpcFactory, RetryClient};
Expand Down Expand Up @@ -44,7 +43,7 @@ impl IBitcoindRpc for EsploraClient {
let genesis_height: u32 = 0;
let genesis_hash = self.0.get_block_hash(genesis_height).await?;

let network = match genesis_hash.encode_hex::<String>().as_str() {
let network = match genesis_hash.to_string().as_str() {
crate::MAINNET_GENESIS_BLOCK_HASH => Network::Bitcoin,
crate::TESTNET_GENESIS_BLOCK_HASH => Network::Testnet,
crate::SIGNET_GENESIS_BLOCK_HASH => Network::Signet,
Expand Down

0 comments on commit 193df54

Please sign in to comment.