@@ -157,6 +157,7 @@ pub struct OnchainTxHandler<ChanSigner: ChannelKeys> {
157
157
prev_local_commitment : Option < LocalCommitmentTransaction > ,
158
158
current_htlc_cache : Option < HTLCTxCache > ,
159
159
prev_htlc_cache : Option < HTLCTxCache > ,
160
+ local_csv : u16 ,
160
161
161
162
key_storage : ChanSigner ,
162
163
@@ -230,6 +231,7 @@ impl<ChanSigner: ChannelKeys + Writeable> OnchainTxHandler<ChanSigner> {
230
231
} else {
231
232
writer. write_all ( & [ 0 ; 1 ] ) ?;
232
233
}
234
+ self . local_csv . write ( writer) ?;
233
235
234
236
self . key_storage . write ( writer) ?;
235
237
@@ -315,6 +317,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
315
317
}
316
318
_ => return Err ( DecodeError :: InvalidValue ) ,
317
319
} ;
320
+ let local_csv = Readable :: read ( reader) ?;
318
321
319
322
let key_storage = Readable :: read ( reader) ?;
320
323
@@ -368,6 +371,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
368
371
prev_local_commitment,
369
372
current_htlc_cache,
370
373
prev_htlc_cache,
374
+ local_csv,
371
375
key_storage,
372
376
claimable_outpoints,
373
377
pending_claim_requests,
@@ -379,7 +383,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
379
383
}
380
384
381
385
impl < ChanSigner : ChannelKeys > OnchainTxHandler < ChanSigner > {
382
- pub ( super ) fn new ( destination_script : Script , keys : ChanSigner , funding_redeemscript : Script , logger : Arc < Logger > ) -> Self {
386
+ pub ( super ) fn new ( destination_script : Script , keys : ChanSigner , funding_redeemscript : Script , local_csv : u16 , logger : Arc < Logger > ) -> Self {
383
387
384
388
let key_storage = keys;
385
389
@@ -390,6 +394,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
390
394
prev_local_commitment : None ,
391
395
current_htlc_cache : None ,
392
396
prev_htlc_cache : None ,
397
+ local_csv,
393
398
key_storage,
394
399
pending_claim_requests : HashMap :: new ( ) ,
395
400
claimable_outpoints : HashMap :: new ( ) ,
0 commit comments