From 66890866d638ba49d0e015358a1d7fdefa6e5afc Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Fri, 18 Feb 2022 17:07:47 -0700 Subject: [PATCH] Remove txid field from TxNotes --- src/rust/src/wallet.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rust/src/wallet.rs b/src/rust/src/wallet.rs index fd821a900..76edbe958 100644 --- a/src/rust/src/wallet.rs +++ b/src/rust/src/wallet.rs @@ -42,7 +42,6 @@ pub struct DecryptedNote { } struct TxNotes { - txid: TxId, decrypted_notes: BTreeMap, } @@ -154,7 +153,6 @@ impl Wallet { bundle: &Bundle, ) -> Vec { let mut tx_notes = TxNotes { - txid: *txid, decrypted_notes: BTreeMap::new(), }; @@ -242,14 +240,14 @@ impl Wallet { require_spending_key: bool, ) -> Vec<(OutPoint, DecryptedNote)> { self.wallet_tx_notes - .values() - .flat_map(|tx_notes| { + .iter() + .flat_map(|(txid, tx_notes)| { tx_notes .decrypted_notes .iter() .filter_map(move |(idx, dnote)| { let outpoint = OutPoint { - txid: tx_notes.txid, + txid: *txid, action_idx: *idx, };