From 16acfaf7655a9ad2eeddacde0675126ec6795303 Mon Sep 17 00:00:00 2001 From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Wed, 18 Aug 2021 15:48:16 +0000 Subject: [PATCH] Drop unused change output calculation We don't need this at all anymore since LDK automatically scans for the correct output index these days. Fixes #31. --- src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0229873..9e82f8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -129,8 +129,6 @@ async fn handle_ldk_events( // Have your wallet put the inputs into the transaction such that the output is // satisfied. let funded_tx = bitcoind_client.fund_raw_transaction(raw_tx).await; - let change_output_position = funded_tx.changepos; - assert!(change_output_position == 0 || change_output_position == 1); // Sign the final funding transaction and broadcast it. let signed_tx = bitcoind_client.sign_raw_transaction_with_wallet(funded_tx.hex).await; -- 2.39.5