]> Untitled Git - bdk/commitdiff
s/vin/vout/
authorLLFourn <lloyd.fourn@gmail.com>
Fri, 5 Nov 2021 02:30:41 +0000 (13:30 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Tue, 9 Nov 2021 22:07:36 +0000 (09:07 +1100)
src/blockchain/script_sync.rs

index f78a6bced101b177270303eed432da5e8a84e2f0..e7ae2763d554a35dd008896b2b5775252ebad020 100644 (file)
@@ -170,7 +170,7 @@ impl<'a, D: BatchDatabase> TxReq<'a, D> {
         let tx_details: Vec<TransactionDetails> = tx_details
             .into_iter()
             .zip(self.state.tx_needed.iter())
-            .map(|((vin, tx), txid)| {
+            .map(|((vout, tx), txid)| {
                 debug!("found tx_details for {}", txid);
                 assert_eq!(tx.txid(), *txid);
                 let mut sent: u64 = 0;
@@ -178,7 +178,7 @@ impl<'a, D: BatchDatabase> TxReq<'a, D> {
                 let mut inputs_sum: u64 = 0;
                 let mut outputs_sum: u64 = 0;
 
-                for (txout, input) in vin.into_iter().zip(tx.input.iter()) {
+                for (txout, input) in vout.into_iter().zip(tx.input.iter()) {
                     let txout = match txout {
                         Some(txout) => txout,
                         None => {