From ce8c617c9d562a54728c6cafc0562a66bae56b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Wed, 31 Jan 2024 22:19:01 +0800 Subject: [PATCH] feat(electrum): impl `ElectrumExt` for all that impl `ElectrumApi` --- crates/electrum/src/electrum_ext.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/electrum/src/electrum_ext.rs b/crates/electrum/src/electrum_ext.rs index dc71987f6..96c4880c4 100644 --- a/crates/electrum/src/electrum_ext.rs +++ b/crates/electrum/src/electrum_ext.rs @@ -179,7 +179,7 @@ pub trait ElectrumExt { ) -> Result; } -impl ElectrumExt for Client { +impl ElectrumExt for A { fn full_scan( &self, prev_tip: CheckPoint, @@ -303,7 +303,7 @@ impl ElectrumExt for Client { /// Return a [`CheckPoint`] of the latest tip, that connects with `prev_tip`. fn construct_update_tip( - client: &Client, + client: &impl ElectrumApi, prev_tip: CheckPoint, ) -> Result<(CheckPoint, Option), Error> { let HeaderNotification { height, .. } = client.block_headers_subscribe()?; @@ -417,7 +417,7 @@ fn determine_tx_anchor( } fn populate_with_outpoints( - client: &Client, + client: &impl ElectrumApi, cps: &BTreeMap, relevant_txids: &mut RelevantTxids, outpoints: impl IntoIterator, @@ -478,7 +478,7 @@ fn populate_with_outpoints( } fn populate_with_txids( - client: &Client, + client: &impl ElectrumApi, cps: &BTreeMap, relevant_txids: &mut RelevantTxids, txids: impl IntoIterator, @@ -514,7 +514,7 @@ fn populate_with_txids( } fn populate_with_spks( - client: &Client, + client: &impl ElectrumApi, cps: &BTreeMap, relevant_txids: &mut RelevantTxids, spks: &mut impl Iterator,