@@ -1555,22 +1555,16 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1555
1555
let counterparty_pubkeys = self . counterparty_pubkeys . as_ref ( ) . unwrap ( ) ;
1556
1556
let funding_redeemscript = self . get_funding_redeemscript ( ) ;
1557
1557
let funding_txo_script = funding_redeemscript. to_v0_p2wsh ( ) ;
1558
- macro_rules! create_monitor {
1559
- ( ) => { {
1560
- let mut channel_monitor = ChannelMonitor :: new( self . holder_keys. clone( ) ,
1561
- & self . shutdown_pubkey, self . holder_selected_contest_delay,
1562
- & self . destination_script, ( funding_txo, funding_txo_script. clone( ) ) ,
1563
- & counterparty_pubkeys. htlc_basepoint, & counterparty_pubkeys. delayed_payment_basepoint,
1564
- self . counterparty_selected_contest_delay, funding_redeemscript. clone( ) , self . channel_value_satoshis,
1565
- self . get_commitment_transaction_number_obscure_factor( ) ,
1566
- initial_commitment_tx. clone( ) ) ;
1567
-
1568
- 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) ;
1569
- channel_monitor
1570
- } }
1571
- }
1558
+ let mut channel_monitor = ChannelMonitor :: new ( self . holder_keys . clone ( ) ,
1559
+ & self . shutdown_pubkey , self . holder_selected_contest_delay ,
1560
+ & self . destination_script , ( funding_txo, funding_txo_script. clone ( ) ) ,
1561
+ & counterparty_pubkeys. htlc_basepoint , & counterparty_pubkeys. delayed_payment_basepoint ,
1562
+ self . counterparty_selected_contest_delay , funding_redeemscript. clone ( ) , self . channel_value_satoshis ,
1563
+ self . get_commitment_transaction_number_obscure_factor ( ) ,
1564
+
1565
+ initial_commitment_tx. clone ( ) ) ;
1572
1566
1573
- let channel_monitor = create_monitor ! ( ) ;
1567
+ 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 ) ;
1574
1568
1575
1569
self . channel_state = ChannelState :: FundingSent as u32 ;
1576
1570
self . channel_id = funding_txo. to_channel_id ( ) ;
@@ -1618,24 +1612,17 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1618
1612
let funding_redeemscript = self . get_funding_redeemscript ( ) ;
1619
1613
let funding_txo = self . funding_txo . as_ref ( ) . unwrap ( ) ;
1620
1614
let funding_txo_script = funding_redeemscript. to_v0_p2wsh ( ) ;
1621
- macro_rules! create_monitor {
1622
- ( ) => { {
1623
- 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( ) ) ;
1624
- let mut channel_monitor = ChannelMonitor :: new( self . holder_keys. clone( ) ,
1625
- & self . shutdown_pubkey, self . holder_selected_contest_delay,
1626
- & self . destination_script, ( funding_txo. clone( ) , funding_txo_script. clone( ) ) ,
1627
- & counterparty_pubkeys. htlc_basepoint, & counterparty_pubkeys. delayed_payment_basepoint,
1628
- self . counterparty_selected_contest_delay, funding_redeemscript. clone( ) , self . channel_value_satoshis,
1629
- self . get_commitment_transaction_number_obscure_factor( ) ,
1630
- commitment_tx) ;
1631
-
1632
- 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) ;
1633
-
1634
- channel_monitor
1635
- } }
1636
- }
1615
+ 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 ( ) ) ;
1616
+ let mut channel_monitor = ChannelMonitor :: new ( self . holder_keys . clone ( ) ,
1617
+ & self . shutdown_pubkey , self . holder_selected_contest_delay ,
1618
+ & self . destination_script , ( funding_txo. clone ( ) , funding_txo_script. clone ( ) ) ,
1619
+ & counterparty_pubkeys. htlc_basepoint , & counterparty_pubkeys. delayed_payment_basepoint ,
1620
+ self . counterparty_selected_contest_delay , funding_redeemscript. clone ( ) , self . channel_value_satoshis ,
1621
+ self . get_commitment_transaction_number_obscure_factor ( ) ,
1622
+
1623
+ commitment_tx) ;
1637
1624
1638
- let channel_monitor = create_monitor ! ( ) ;
1625
+ 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 ) ;
1639
1626
1640
1627
assert_eq ! ( self . channel_state & ( ChannelState :: MonitorUpdateFailed as u32 ) , 0 ) ; // We have no had any monitor(s) yet to fail update!
1641
1628
self . channel_state = ChannelState :: FundingSent as u32 ;
0 commit comments