Make bdk and bdk_chain work under 1.57.0
- rewrite some parts of the code to deal with older borrow checker - downgraded hashbrown
This commit is contained in:
committed by
Daniela Brozzoni
parent
3a5d727899
commit
38ef170ed1
@@ -79,13 +79,12 @@ impl<I: Clone + Ord> SpkTxOutIndex<I> {
|
||||
/// See [`ForEachTxout`] for the types that support this.
|
||||
///
|
||||
/// [`ForEachTxout`]: crate::ForEachTxOut
|
||||
pub fn scan(&mut self, txouts: &impl ForEachTxOut) -> BTreeSet<&I> {
|
||||
// let scanner = &mut SpkTxOutScanner::new(self);
|
||||
pub fn scan(&mut self, txouts: &impl ForEachTxOut) -> BTreeSet<I> {
|
||||
let mut scanned_indices = BTreeSet::new();
|
||||
|
||||
txouts.for_each_txout(|(op, txout)| {
|
||||
if let Some(spk_i) = scan_txout!(self, op, txout) {
|
||||
scanned_indices.insert(spk_i);
|
||||
scanned_indices.insert(spk_i.clone());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -207,7 +206,7 @@ impl<I: Clone + Ord> SpkTxOutIndex<I> {
|
||||
{
|
||||
self.unused
|
||||
.range(range)
|
||||
.map(|index| (index, self.spk_at_index(index).expect("must exist")))
|
||||
.map(move |index| (index, self.spk_at_index(index).expect("must exist")))
|
||||
}
|
||||
|
||||
/// Returns whether the script pubkey at `index` has been used or not.
|
||||
|
||||
Reference in New Issue
Block a user