@@ -157,6 +157,7 @@ pub struct OnchainTxHandler<ChanSigner: ChannelKeys> {
157157 prev_local_commitment : Option < LocalCommitmentTransaction > ,
158158 current_htlc_cache : Option < HTLCTxCache > ,
159159 prev_htlc_cache : Option < HTLCTxCache > ,
160+ local_csv : u16 ,
160161
161162 key_storage : ChanSigner ,
162163
@@ -230,6 +231,7 @@ impl<ChanSigner: ChannelKeys + Writeable> OnchainTxHandler<ChanSigner> {
230231 } else {
231232 writer. write_all ( & [ 0 ; 1 ] ) ?;
232233 }
234+ self . local_csv . write ( writer) ?;
233235
234236 self . key_storage . write ( writer) ?;
235237
@@ -315,6 +317,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
315317 }
316318 _ => return Err ( DecodeError :: InvalidValue ) ,
317319 } ;
320+ let local_csv = Readable :: read ( reader) ?;
318321
319322 let key_storage = Readable :: read ( reader) ?;
320323
@@ -368,6 +371,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
368371 prev_local_commitment,
369372 current_htlc_cache,
370373 prev_htlc_cache,
374+ local_csv,
371375 key_storage,
372376 claimable_outpoints,
373377 pending_claim_requests,
@@ -379,7 +383,7 @@ impl<ChanSigner: ChannelKeys + Readable> ReadableArgs<Arc<Logger>> for OnchainTx
379383}
380384
381385impl < 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 {
383387
384388 let key_storage = keys;
385389
@@ -390,6 +394,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
390394 prev_local_commitment : None ,
391395 current_htlc_cache : None ,
392396 prev_htlc_cache : None ,
397+ local_csv,
393398 key_storage,
394399 pending_claim_requests : HashMap :: new ( ) ,
395400 claimable_outpoints : HashMap :: new ( ) ,
0 commit comments