Advance self blinded payment paths
[rust-lightning] / lightning / src / ln / async_signer_tests.rs
index d600372807e3f15fb68bdf0916cafd98cd335e50..8e929fe844da41df6d17deabc90079ad3b6a37e8 100644 (file)
@@ -12,6 +12,7 @@
 
 use bitcoin::{Transaction, TxOut, TxIn, Amount};
 use bitcoin::blockdata::locktime::absolute::LockTime;
+use bitcoin::transaction::Version;
 
 use crate::chain::channelmonitor::LATENCY_GRACE_PERIOD_BLOCKS;
 use crate::events::bump_transaction::WalletSource;
@@ -344,12 +345,12 @@ fn do_test_async_holder_signatures(anchors: bool, remote_commitment: bool) {
 
        let closing_node = if remote_commitment { &nodes[1] } else { &nodes[0] };
        let coinbase_tx = Transaction {
-               version: 2,
+               version: Version::TWO,
                lock_time: LockTime::ZERO,
                input: vec![TxIn { ..Default::default() }],
                output: vec![
                        TxOut {
-                               value: Amount::ONE_BTC.to_sat(),
+                               value: Amount::ONE_BTC,
                                script_pubkey: closing_node.wallet_source.get_change_script().unwrap(),
                        },
                ],
@@ -372,7 +373,7 @@ fn do_test_async_holder_signatures(anchors: bool, remote_commitment: bool) {
                nodes[1].node.force_close_broadcasting_latest_txn(&chan_id, &nodes[0].node.get_our_node_id(), error_message.to_string()).unwrap();
                check_added_monitors(&nodes[1], 1);
                check_closed_broadcast(&nodes[1], 1, true);
-               check_closed_event(&nodes[1], 1, ClosureReason::HolderForceClosed, false, &[nodes[0].node.get_our_node_id()], 100_000);
+               check_closed_event(&nodes[1], 1, ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true) }, false, &[nodes[0].node.get_our_node_id()], 100_000);
        } else {
                // We'll connect blocks until the sender has to go onchain to time out the HTLC.
                connect_blocks(&nodes[0], TEST_FINAL_CLTV + LATENCY_GRACE_PERIOD_BLOCKS + 1);