@@ -818,7 +818,7 @@ fn pre_funding_lock_shutdown_test() {
818
818
nodes[ 0 ] . block_notifier . block_connected ( & Block { header, txdata : vec ! [ tx. clone( ) ] } , 1 ) ;
819
819
nodes[ 1 ] . block_notifier . block_connected ( & Block { header, txdata : vec ! [ tx. clone( ) ] } , 1 ) ;
820
820
821
- nodes[ 0 ] . node . close_channel ( & OutPoint :: new ( tx. txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
821
+ nodes[ 0 ] . node . close_channel ( & OutPoint { txid : tx. txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
822
822
let node_0_shutdown = get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendShutdown , nodes[ 1 ] . node. get_our_node_id( ) ) ;
823
823
nodes[ 1 ] . node . handle_shutdown ( & nodes[ 0 ] . node . get_our_node_id ( ) , & node_0_shutdown) ;
824
824
let node_1_shutdown = get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendShutdown , nodes[ 0 ] . node. get_our_node_id( ) ) ;
@@ -3079,7 +3079,7 @@ fn test_force_close_fail_back() {
3079
3079
// Now check that if we add the preimage to ChannelMonitor it broadcasts our HTLC-Success..
3080
3080
{
3081
3081
let mut monitors = nodes[ 2 ] . chan_monitor . simple_monitor . monitors . lock ( ) . unwrap ( ) ;
3082
- monitors. get_mut ( & OutPoint :: new ( Txid :: from_slice ( & payment_event. commitment_msg . channel_id [ ..] ) . unwrap ( ) , 0 ) ) . unwrap ( )
3082
+ monitors. get_mut ( & OutPoint { txid : Txid :: from_slice ( & payment_event. commitment_msg . channel_id [ ..] ) . unwrap ( ) , index : 0 } ) . unwrap ( )
3083
3083
. provide_payment_preimage ( & our_payment_hash, & our_payment_preimage) ;
3084
3084
}
3085
3085
nodes[ 2 ] . block_notifier . block_connected_checked ( & header, 1 , & [ & tx] , & [ 1 ] ) ;
@@ -6673,7 +6673,7 @@ fn test_upfront_shutdown_script() {
6673
6673
// We test that in case of peer committing upfront to a script, if it changes at closing, we refuse to sign
6674
6674
let flags = InitFeatures :: known ( ) ;
6675
6675
let chan = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 2 , 1000000 , 1000000 , flags. clone ( ) , flags. clone ( ) ) ;
6676
- nodes[ 0 ] . node . close_channel ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
6676
+ nodes[ 0 ] . node . close_channel ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
6677
6677
let mut node_0_shutdown = get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendShutdown , nodes[ 2 ] . node. get_our_node_id( ) ) ;
6678
6678
node_0_shutdown. scriptpubkey = Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_RETURN ) . into_script ( ) . to_p2sh ( ) ;
6679
6679
// Test we enforce upfront_scriptpbukey if by providing a diffrent one at closing that we disconnect peer
@@ -6683,7 +6683,7 @@ fn test_upfront_shutdown_script() {
6683
6683
6684
6684
// We test that in case of peer committing upfront to a script, if it doesn't change at closing, we sign
6685
6685
let chan = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 2 , 1000000 , 1000000 , flags. clone ( ) , flags. clone ( ) ) ;
6686
- nodes[ 0 ] . node . close_channel ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
6686
+ nodes[ 0 ] . node . close_channel ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
6687
6687
let node_0_shutdown = get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendShutdown , nodes[ 2 ] . node. get_our_node_id( ) ) ;
6688
6688
// We test that in case of peer committing upfront to a script, if it oesn't change at closing, we sign
6689
6689
nodes[ 2 ] . node . handle_shutdown ( & nodes[ 0 ] . node . get_our_node_id ( ) , & node_0_shutdown) ;
@@ -6697,7 +6697,7 @@ fn test_upfront_shutdown_script() {
6697
6697
// We test that if case of peer non-signaling we don't enforce committed script at channel opening
6698
6698
let flags_no = InitFeatures :: known ( ) . clear_upfront_shutdown_script ( ) ;
6699
6699
let chan = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1000000 , 1000000 , flags_no, flags. clone ( ) ) ;
6700
- nodes[ 0 ] . node . close_channel ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
6700
+ nodes[ 0 ] . node . close_channel ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
6701
6701
let mut node_1_shutdown = get_event_msg ! ( nodes[ 0 ] , MessageSendEvent :: SendShutdown , nodes[ 1 ] . node. get_our_node_id( ) ) ;
6702
6702
node_1_shutdown. scriptpubkey = Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_RETURN ) . into_script ( ) . to_p2sh ( ) ;
6703
6703
nodes[ 1 ] . node . handle_shutdown ( & nodes[ 0 ] . node . get_our_node_id ( ) , & node_1_shutdown) ;
@@ -6711,7 +6711,7 @@ fn test_upfront_shutdown_script() {
6711
6711
// We test that if user opt-out, we provide a zero-length script at channel opening and we are able to close
6712
6712
// channel smoothly, opt-out is from channel initiator here
6713
6713
let chan = create_announced_chan_between_nodes_with_value ( & nodes, 1 , 0 , 1000000 , 1000000 , flags. clone ( ) , flags. clone ( ) ) ;
6714
- nodes[ 1 ] . node . close_channel ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
6714
+ nodes[ 1 ] . node . close_channel ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
6715
6715
let mut node_0_shutdown = get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendShutdown , nodes[ 0 ] . node. get_our_node_id( ) ) ;
6716
6716
node_0_shutdown. scriptpubkey = Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_RETURN ) . into_script ( ) . to_p2sh ( ) ;
6717
6717
nodes[ 0 ] . node . handle_shutdown ( & nodes[ 1 ] . node . get_our_node_id ( ) , & node_0_shutdown) ;
@@ -6725,7 +6725,7 @@ fn test_upfront_shutdown_script() {
6725
6725
//// We test that if user opt-out, we provide a zero-length script at channel opening and we are able to close
6726
6726
//// channel smoothly
6727
6727
let chan = create_announced_chan_between_nodes_with_value ( & nodes, 0 , 1 , 1000000 , 1000000 , flags. clone ( ) , flags. clone ( ) ) ;
6728
- nodes[ 1 ] . node . close_channel ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) . to_channel_id ( ) ) . unwrap ( ) ;
6728
+ nodes[ 1 ] . node . close_channel ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } . to_channel_id ( ) ) . unwrap ( ) ;
6729
6729
let mut node_0_shutdown = get_event_msg ! ( nodes[ 1 ] , MessageSendEvent :: SendShutdown , nodes[ 0 ] . node. get_our_node_id( ) ) ;
6730
6730
node_0_shutdown. scriptpubkey = Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_RETURN ) . into_script ( ) . to_p2sh ( ) ;
6731
6731
nodes[ 0 ] . node . handle_shutdown ( & nodes[ 1 ] . node . get_our_node_id ( ) , & node_0_shutdown) ;
@@ -7526,7 +7526,7 @@ fn test_bump_txn_sanitize_tracking_maps() {
7526
7526
connect_blocks ( & nodes[ 0 ] . block_notifier , 5 , 130 , false , header_130. bitcoin_hash ( ) ) ;
7527
7527
{
7528
7528
let monitors = nodes[ 0 ] . chan_monitor . simple_monitor . monitors . lock ( ) . unwrap ( ) ;
7529
- if let Some ( monitor) = monitors. get ( & OutPoint :: new ( chan. 3 . txid ( ) , 0 ) ) {
7529
+ if let Some ( monitor) = monitors. get ( & OutPoint { txid : chan. 3 . txid ( ) , index : 0 } ) {
7530
7530
assert ! ( monitor. onchain_tx_handler. pending_claim_requests. is_empty( ) ) ;
7531
7531
assert ! ( monitor. onchain_tx_handler. claimable_outpoints. is_empty( ) ) ;
7532
7532
}
0 commit comments