@@ -757,7 +757,7 @@ pub struct ChannelMonitor<ChanSigner: ChannelKeys> {
757
757
// first is the idx of the first of the two revocation points
758
758
their_cur_revocation_points : Option < ( u64 , PublicKey , Option < PublicKey > ) > ,
759
759
760
- their_to_self_delay : u16 ,
760
+ on_local_tx_csv : u16 ,
761
761
762
762
commitment_secrets : CounterpartyCommitmentSecrets ,
763
763
remote_claimable_outpoints : HashMap < Txid , Vec < ( HTLCOutputInCommitment , Option < Box < HTLCSource > > ) > > ,
@@ -846,7 +846,7 @@ impl<ChanSigner: ChannelKeys> PartialEq for ChannelMonitor<ChanSigner> {
846
846
self . funding_redeemscript != other. funding_redeemscript ||
847
847
self . channel_value_satoshis != other. channel_value_satoshis ||
848
848
self . their_cur_revocation_points != other. their_cur_revocation_points ||
849
- self . their_to_self_delay != other. their_to_self_delay ||
849
+ self . on_local_tx_csv != other. on_local_tx_csv ||
850
850
self . commitment_secrets != other. commitment_secrets ||
851
851
self . remote_claimable_outpoints != other. remote_claimable_outpoints ||
852
852
self . remote_commitment_txn_on_chain != other. remote_commitment_txn_on_chain ||
@@ -947,7 +947,7 @@ impl<ChanSigner: ChannelKeys + Writeable> ChannelMonitor<ChanSigner> {
947
947
} ,
948
948
}
949
949
950
- writer. write_all ( & byte_utils:: be16_to_array ( self . their_to_self_delay ) ) ?;
950
+ writer. write_all ( & byte_utils:: be16_to_array ( self . on_local_tx_csv ) ) ?;
951
951
952
952
self . commitment_secrets . write ( writer) ?;
953
953
@@ -1080,7 +1080,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1080
1080
pub ( super ) fn new ( keys : ChanSigner , shutdown_pubkey : & PublicKey ,
1081
1081
on_remote_tx_csv : u16 , destination_script : & Script , funding_info : ( OutPoint , Script ) ,
1082
1082
remote_htlc_base_key : & PublicKey , remote_delayed_payment_base_key : & PublicKey ,
1083
- their_to_self_delay : u16 , funding_redeemscript : Script , channel_value_satoshis : u64 ,
1083
+ on_local_tx_csv : u16 , funding_redeemscript : Script , channel_value_satoshis : u64 ,
1084
1084
commitment_transaction_number_obscure_factor : u64 ,
1085
1085
initial_local_commitment_tx : LocalCommitmentTransaction ,
1086
1086
logger : Arc < Logger > ) -> ChannelMonitor < ChanSigner > {
@@ -1091,7 +1091,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1091
1091
1092
1092
let remote_tx_cache = RemoteTxCache { remote_delayed_payment_base_key : * remote_delayed_payment_base_key, remote_htlc_base_key : * remote_htlc_base_key, on_remote_tx_csv, per_htlc : HashMap :: new ( ) } ;
1093
1093
1094
- let mut onchain_tx_handler = OnchainTxHandler :: new ( destination_script. clone ( ) , keys. clone ( ) , their_to_self_delay , logger. clone ( ) ) ;
1094
+ let mut onchain_tx_handler = OnchainTxHandler :: new ( destination_script. clone ( ) , keys. clone ( ) , on_local_tx_csv , logger. clone ( ) ) ;
1095
1095
1096
1096
let local_tx_sequence = initial_local_commitment_tx. unsigned_tx . input [ 0 ] . sequence as u64 ;
1097
1097
let local_tx_locktime = initial_local_commitment_tx. unsigned_tx . lock_time as u64 ;
@@ -1131,7 +1131,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1131
1131
channel_value_satoshis : channel_value_satoshis,
1132
1132
their_cur_revocation_points : None ,
1133
1133
1134
- their_to_self_delay ,
1134
+ on_local_tx_csv ,
1135
1135
1136
1136
commitment_secrets : CounterpartyCommitmentSecrets :: new ( ) ,
1137
1137
remote_claimable_outpoints : HashMap :: new ( ) ,
@@ -1273,7 +1273,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1273
1273
/// monitor watches for timeouts and may broadcast it if we approach such a timeout. Thus, it
1274
1274
/// is important that any clones of this channel monitor (including remote clones) by kept
1275
1275
/// up-to-date as our local commitment transaction is updated.
1276
- /// Panics if set_their_to_self_delay has never been called.
1276
+ /// Panics if set_on_local_tx_csv has never been called.
1277
1277
pub ( super ) fn provide_latest_local_commitment_tx_info ( & mut self , commitment_tx : LocalCommitmentTransaction , htlc_outputs : Vec < ( HTLCOutputInCommitment , Option < Signature > , Option < HTLCSource > ) > ) -> Result < ( ) , MonitorUpdateError > {
1278
1278
if self . local_tx_signed {
1279
1279
return Err ( MonitorUpdateError ( "A local commitment tx has already been signed, no new local commitment txn can be sent to our counterparty" ) ) ;
@@ -1683,7 +1683,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
1683
1683
let mut claim_requests = Vec :: with_capacity ( local_tx. htlc_outputs . len ( ) ) ;
1684
1684
let mut watch_outputs = Vec :: with_capacity ( local_tx. htlc_outputs . len ( ) ) ;
1685
1685
1686
- let redeemscript = chan_utils:: get_revokeable_redeemscript ( & local_tx. revocation_key , self . their_to_self_delay , & local_tx. delayed_payment_key ) ;
1686
+ let redeemscript = chan_utils:: get_revokeable_redeemscript ( & local_tx. revocation_key , self . on_local_tx_csv , & local_tx. delayed_payment_key ) ;
1687
1687
let broadcasted_local_revokable_script = Some ( ( redeemscript. to_v0_p2wsh ( ) , local_tx. per_commitment_point . clone ( ) , redeemscript) ) ;
1688
1688
1689
1689
for & ( ref htlc, _, _) in local_tx. htlc_outputs . iter ( ) {
@@ -2190,7 +2190,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
2190
2190
outpoint : BitcoinOutPoint { txid : tx. txid ( ) , vout : i as u32 } ,
2191
2191
per_commitment_point : broadcasted_local_revokable_script. 1 ,
2192
2192
witness_script : broadcasted_local_revokable_script. 2 . clone ( ) ,
2193
- to_self_delay : self . their_to_self_delay ,
2193
+ to_self_delay : self . on_local_tx_csv ,
2194
2194
output : outp. clone ( ) ,
2195
2195
} ) ;
2196
2196
break ;
@@ -2324,7 +2324,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for (BlockHas
2324
2324
}
2325
2325
} ;
2326
2326
2327
- let their_to_self_delay : u16 = Readable :: read ( reader) ?;
2327
+ let on_local_tx_csv : u16 = Readable :: read ( reader) ?;
2328
2328
2329
2329
let commitment_secrets = Readable :: read ( reader) ?;
2330
2330
@@ -2518,7 +2518,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for (BlockHas
2518
2518
channel_value_satoshis,
2519
2519
their_cur_revocation_points,
2520
2520
2521
- their_to_self_delay ,
2521
+ on_local_tx_csv ,
2522
2522
2523
2523
commitment_secrets,
2524
2524
remote_claimable_outpoints,
0 commit comments