@@ -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 ( ) ;
@@ -1599,25 +1592,18 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1599
1592
let funding_redeemscript = self . get_funding_redeemscript ( ) ;
1600
1593
let funding_txo = self . funding_txo . as_ref ( ) . unwrap ( ) ;
1601
1594
let funding_txo_script = funding_redeemscript. to_v0_p2wsh ( ) ;
1602
- macro_rules! create_monitor {
1603
- ( ) => { {
1604
- 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( ) ) ;
1605
- let mut channel_monitor = ChannelMonitor :: new( self . holder_keys. clone( ) ,
1606
- & self . shutdown_pubkey, self . holder_selected_contest_delay,
1607
- & self . destination_script, ( funding_txo. clone( ) , funding_txo_script. clone( ) ) ,
1608
- & counterparty_pubkeys,
1609
- self . counterparty_selected_contest_delay, funding_redeemscript. clone( ) , self . channel_value_satoshis,
1610
- self . get_commitment_transaction_number_obscure_factor( ) ,
1611
- self . is_outbound( ) ,
1612
- commitment_tx) ;
1613
-
1614
- 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) ;
1615
-
1616
- channel_monitor
1617
- } }
1618
- }
1595
+ 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 ( ) ) ;
1596
+ let mut channel_monitor = ChannelMonitor :: new ( self . holder_keys . clone ( ) ,
1597
+ & self . shutdown_pubkey , self . holder_selected_contest_delay ,
1598
+ & self . destination_script , ( funding_txo. clone ( ) , funding_txo_script. clone ( ) ) ,
1599
+ & counterparty_pubkeys,
1600
+ self . counterparty_selected_contest_delay , funding_redeemscript. clone ( ) , self . channel_value_satoshis ,
1601
+ self . get_commitment_transaction_number_obscure_factor ( ) ,
1602
+ self . is_outbound ( ) ,
1603
+ commitment_tx) ;
1604
+
1605
+ 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
1606
1620
- let channel_monitor = create_monitor ! ( ) ;
1621
1607
channel_monitor
1622
1608
} ;
1623
1609
0 commit comments