Add helper methods

Has fetched blocks checked to be the indexed blocks. Has scanned outputs be
sorted, meaning they aren't subject to implicit order/may be non-deterministic
(such as if handled by a threadpool).
This commit is contained in:
Luke Parker
2024-08-26 23:15:19 -04:00
parent b65dbacd6a
commit 7e71840822
5 changed files with 63 additions and 50 deletions

View File

@@ -54,7 +54,9 @@ pub trait Block: Send + Sync + Sized + Clone + Debug {
fn id(&self) -> [u8; 32];
/// Scan all outputs within this block to find the outputs spendable by this key.
fn scan_for_outputs(&self, key: Self::Key) -> Vec<Self::Output>;
///
/// No assumption on the order of the returned outputs is made.
fn scan_for_outputs_unordered(&self, key: Self::Key) -> Vec<Self::Output>;
/// Check if this block resolved any Eventualities.
///