X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fonchaintx.rs;h=fce935549024ae697e5e611bb730382ce8f5f83f;hb=6b8a5166476228f93a06fe55db40fd9715b118ad;hp=406d9f38bd12b72e3eea04e07c0294ab38252854;hpb=080afeb6ea5746ac076658c723492e3d6d257ceb;p=rust-lightning diff --git a/lightning/src/ln/onchaintx.rs b/lightning/src/ln/onchaintx.rs index 406d9f38..fce93554 100644 --- a/lightning/src/ln/onchaintx.rs +++ b/lightning/src/ln/onchaintx.rs @@ -157,6 +157,7 @@ pub struct OnchainTxHandler { prev_local_commitment: Option, current_htlc_cache: Option, prev_htlc_cache: Option, + local_csv: u16, key_storage: ChanSigner, @@ -230,6 +231,7 @@ impl OnchainTxHandler { } else { writer.write_all(&[0; 1])?; } + self.local_csv.write(writer)?; self.key_storage.write(writer)?; @@ -315,6 +317,7 @@ impl ReadableArgs> for OnchainTx } _ => return Err(DecodeError::InvalidValue), }; + let local_csv = Readable::read(reader)?; let key_storage = Readable::read(reader)?; @@ -368,6 +371,7 @@ impl ReadableArgs> for OnchainTx prev_local_commitment, current_htlc_cache, prev_htlc_cache, + local_csv, key_storage, claimable_outpoints, pending_claim_requests, @@ -379,7 +383,7 @@ impl ReadableArgs> for OnchainTx } impl OnchainTxHandler { - pub(super) fn new(destination_script: Script, keys: ChanSigner, funding_redeemscript: Script, logger: Arc) -> Self { + pub(super) fn new(destination_script: Script, keys: ChanSigner, funding_redeemscript: Script, local_csv: u16, logger: Arc) -> Self { let key_storage = keys; @@ -390,6 +394,7 @@ impl OnchainTxHandler { prev_local_commitment: None, current_htlc_cache: None, prev_htlc_cache: None, + local_csv, key_storage, pending_claim_requests: HashMap::new(), claimable_outpoints: HashMap::new(),