]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Reuse txdata in functional_test_utils.rs
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 7 Apr 2021 18:43:32 +0000 (11:43 -0700)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 14 Apr 2021 19:57:06 +0000 (12:57 -0700)
lightning/src/ln/functional_test_utils.rs

index 9e9c1f16c9aa8f855a55764e1bad799b4a759fef..8dae29fdc73d7373da17f6de1ad9ada02b7f12c8 100644 (file)
@@ -130,10 +130,10 @@ fn do_connect_block<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, block: &Block, s
                match *node.connect_style.borrow() {
                        ConnectStyle::BestBlockFirst|ConnectStyle::BestBlockFirstSkippingBlocks => {
                                node.node.update_best_block(&block.header, height);
-                               node.node.transactions_confirmed(&block.header, height, &block.txdata.iter().enumerate().collect::<Vec<_>>());
+                               node.node.transactions_confirmed(&block.header, height, &txdata);
                        },
                        ConnectStyle::TransactionsFirst|ConnectStyle::TransactionsFirstSkippingBlocks => {
-                               node.node.transactions_confirmed(&block.header, height, &block.txdata.iter().enumerate().collect::<Vec<_>>());
+                               node.node.transactions_confirmed(&block.header, height, &txdata);
                                node.node.update_best_block(&block.header, height);
                        },
                        ConnectStyle::FullBlockViaListen => {