) -> Result<ElectrumUpdate, Error>;
}
-impl ElectrumExt for Client {
+impl<A: ElectrumApi> ElectrumExt for A {
fn full_scan<K: Ord + Clone>(
&self,
prev_tip: CheckPoint,
/// 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<u32>), Error> {
let HeaderNotification { height, .. } = client.block_headers_subscribe()?;
}
fn populate_with_outpoints(
- client: &Client,
+ client: &impl ElectrumApi,
cps: &BTreeMap<u32, CheckPoint>,
relevant_txids: &mut RelevantTxids,
outpoints: impl IntoIterator<Item = OutPoint>,
}
fn populate_with_txids(
- client: &Client,
+ client: &impl ElectrumApi,
cps: &BTreeMap<u32, CheckPoint>,
relevant_txids: &mut RelevantTxids,
txids: impl IntoIterator<Item = Txid>,
}
fn populate_with_spks<I: Ord + Clone>(
- client: &Client,
+ client: &impl ElectrumApi,
cps: &BTreeMap<u32, CheckPoint>,
relevant_txids: &mut RelevantTxids,
spks: &mut impl Iterator<Item = (I, ScriptBuf)>,