From 9bcde219094b5a80a77ab9a0a4b95a7540ee7fe0 Mon Sep 17 00:00:00 2001
From: gmart7t2 <49558347+gmart7t2@users.noreply.github.com>
Date: Tue, 19 Sep 2023 17:18:44 -0300
Subject: [PATCH] Allow running `find` on a range of sats (#1992)
---
src/index.rs | 54 ++++++++++++++++++++++++++++++++++++++++++
src/subcommand/find.rs | 21 +++++++++++++---
tests/find.rs | 49 +++++++++++++++++++++++++++++++++++++-
3 files changed, 120 insertions(+), 4 deletions(-)
diff --git a/src/index.rs b/src/index.rs
index 4799630cb1..520b3c6452 100644
--- a/src/index.rs
+++ b/src/index.rs
@@ -8,6 +8,7 @@ use {
updater::Updater,
},
super::*,
+ crate::subcommand::find::FindRangeOutput,
crate::wallet::Wallet,
bitcoin::block::Header,
bitcoincore_rpc::{json::GetBlockHeaderResult, Client},
@@ -811,6 +812,59 @@ impl Index {
Ok(None)
}
+ pub(crate) fn find_range(
+ &self,
+ range_start: u64,
+ range_end: u64,
+ ) -> Result