@@ -1531,23 +1531,16 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1531
1531
let counterparty_pubkeys = self . counterparty_pubkeys . as_ref ( ) . unwrap ( ) ;
1532
1532
let funding_redeemscript = self . get_funding_redeemscript ( ) ;
1533
1533
let funding_txo_script = funding_redeemscript. to_v0_p2wsh ( ) ;
1534
- macro_rules! create_monitor {
1535
- ( ) => { {
1536
- let mut channel_monitor = ChannelMonitor :: new( self . holder_keys. clone( ) ,
1537
- & self . shutdown_pubkey, self . holder_selected_contest_delay,
1538
- & self . destination_script, ( funding_txo, funding_txo_script. clone( ) ) ,
1539
- & counterparty_pubkeys,
1540
- self . counterparty_selected_contest_delay, funding_redeemscript. clone( ) , self . channel_value_satoshis,
1541
- self . get_commitment_transaction_number_obscure_factor( ) ,
1542
- self . is_outbound( ) ,
1543
- initial_commitment_tx) ;
1544
-
1545
- channel_monitor. provide_latest_counterparty_commitment_tx_info( & counterparty_initial_commitment_tx, Vec :: new( ) , self . cur_counterparty_commitment_transaction_number, self . counterparty_cur_commitment_point. unwrap( ) , logger) ;
1546
- channel_monitor
1547
- } }
1548
- }
1534
+ let mut channel_monitor = ChannelMonitor :: new ( self . holder_keys . clone ( ) ,
1535
+ & self . shutdown_pubkey , self . holder_selected_contest_delay ,
1536
+ & self . destination_script , ( funding_txo, funding_txo_script. clone ( ) ) ,
1537
+ & counterparty_pubkeys,
1538
+ self . counterparty_selected_contest_delay , funding_redeemscript. clone ( ) , self . channel_value_satoshis ,
1539
+ self . get_commitment_transaction_number_obscure_factor ( ) ,
1540
+ self . is_outbound ( ) ,
1541
+ initial_commitment_tx) ;
1549
1542
1550
- let channel_monitor = create_monitor ! ( ) ;
1543
+ channel_monitor. provide_latest_counterparty_commitment_tx_info ( & counterparty_initial_commitment_tx , Vec :: new ( ) , self . cur_counterparty_commitment_transaction_number , self . counterparty_cur_commitment_point . unwrap ( ) , logger ) ;
1551
1544
1552
1545
self . channel_state = ChannelState :: FundingSent as u32 ;
1553
1546
self . channel_id = funding_txo. to_channel_id ( ) ;
@@ -1597,25 +1590,17 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1597
1590
let funding_redeemscript = self . get_funding_redeemscript ( ) ;
1598
1591
let funding_txo = self . funding_txo . as_ref ( ) . unwrap ( ) ;
1599
1592
let funding_txo_script = funding_redeemscript. to_v0_p2wsh ( ) ;
1600
- macro_rules! create_monitor {
1601
- ( ) => { {
1602
- let commitment_tx = HolderCommitmentTransaction :: new_missing_holder_sig( initial_commitment_tx. clone( ) , msg. signature. clone( ) , & self . holder_keys. pubkeys( ) . funding_pubkey, counterparty_funding_pubkey, holder_keys. clone( ) , self . feerate_per_kw, Vec :: new( ) ) ;
1603
- let mut channel_monitor = ChannelMonitor :: new( self . holder_keys. clone( ) ,
1604
- & self . shutdown_pubkey, self . holder_selected_contest_delay,
1605
- & self . destination_script, ( funding_txo. clone( ) , funding_txo_script. clone( ) ) ,
1606
- & counterparty_pubkeys,
1607
- self . counterparty_selected_contest_delay, funding_redeemscript. clone( ) , self . channel_value_satoshis,
1608
- self . get_commitment_transaction_number_obscure_factor( ) ,
1609
- self . is_outbound( ) ,
1610
- commitment_tx) ;
1611
-
1612
- channel_monitor. provide_latest_counterparty_commitment_tx_info( & counterparty_initial_commitment_tx, Vec :: new( ) , self . cur_counterparty_commitment_transaction_number, self . counterparty_cur_commitment_point. unwrap( ) , logger) ;
1613
-
1614
- channel_monitor
1615
- } }
1616
- }
1617
-
1618
- let channel_monitor = create_monitor ! ( ) ;
1593
+ let commitment_tx = HolderCommitmentTransaction :: new_missing_holder_sig ( initial_commitment_tx. clone ( ) , msg. signature . clone ( ) , & self . holder_keys . pubkeys ( ) . funding_pubkey , counterparty_funding_pubkey, holder_keys. clone ( ) , self . feerate_per_kw , Vec :: new ( ) ) ;
1594
+ let mut channel_monitor = ChannelMonitor :: new ( self . holder_keys . clone ( ) ,
1595
+ & self . shutdown_pubkey , self . holder_selected_contest_delay ,
1596
+ & self . destination_script , ( funding_txo. clone ( ) , funding_txo_script. clone ( ) ) ,
1597
+ & counterparty_pubkeys,
1598
+ self . counterparty_selected_contest_delay , funding_redeemscript. clone ( ) , self . channel_value_satoshis ,
1599
+ self . get_commitment_transaction_number_obscure_factor ( ) ,
1600
+ self . is_outbound ( ) ,
1601
+ commitment_tx) ;
1602
+
1603
+ channel_monitor. provide_latest_counterparty_commitment_tx_info ( & counterparty_initial_commitment_tx, Vec :: new ( ) , self . cur_counterparty_commitment_transaction_number , self . counterparty_cur_commitment_point . unwrap ( ) , logger) ;
1619
1604
1620
1605
assert_eq ! ( self . channel_state & ( ChannelState :: MonitorUpdateFailed as u32 ) , 0 ) ; // We have no had any monitor(s) yet to fail update!
1621
1606
self . channel_state = ChannelState :: FundingSent as u32 ;
0 commit comments