feat(chain)!: use custom return types for ElectrumExt methods

This is more code, but a much more elegant solution than having
`ElectrumExt` methods return `SyncResult`/`FullScanResult` and having an
`ElectrumResultExt` extention trait.
This commit is contained in:
志宇 committed 2024-05-10 14:54:29 +08:00
1 parent 2945c6be88
commit c0d7d60a58
4 files changed
+58 -52

No files matched your search

+4 -2
View File
@@ -191,7 +191,8 @@ fn main() -> anyhow::Result<()> {
let res = client
.full_scan::<_>(request, stop_gap, scan_options.batch_size)
.context("scanning the blockchain")?;
.context("scanning the blockchain")?
.with_confirmation_height_anchor();
(
res.chain_update,
res.graph_update,
@@ -311,7 +312,8 @@ fn main() -> anyhow::Result<()> {
let res = client
.sync(request, scan_options.batch_size)
.context("scanning the blockchain")?;
.context("scanning the blockchain")?
.with_confirmation_height_anchor();
// drop lock on graph and chain
drop((graph, chain));