From: Jeffrey Czyz Date: Fri, 10 May 2024 18:58:41 +0000 (-0500) Subject: Stop writing EcdsaChannelSigner X-Git-Tag: v0.0.124-beta~123^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ae98eccfa90b0669d8dd77e7bc980e021b437ae1;p=rust-lightning Stop writing EcdsaChannelSigner EcdsaChannelSigner is no longer deserialized as of version 0.0.113 and downgrades before version 0.0.113 are no longer supported as of version 0.0.119. --- diff --git a/lightning/src/chain/onchaintx.rs b/lightning/src/chain/onchaintx.rs index 4b4a4dcd1..780375d68 100644 --- a/lightning/src/chain/onchaintx.rs +++ b/lightning/src/chain/onchaintx.rs @@ -33,7 +33,7 @@ use crate::chain::channelmonitor::{ANTI_REORG_DELAY, CLTV_SHARED_CLAIM_BUFFER}; use crate::chain::package::{PackageSolvingData, PackageTemplate}; use crate::chain::transaction::MaybeSignedTransaction; use crate::util::logger::Logger; -use crate::util::ser::{Readable, ReadableArgs, MaybeReadable, UpgradableRequired, Writer, Writeable, VecWriter}; +use crate::util::ser::{Readable, ReadableArgs, MaybeReadable, UpgradableRequired, Writer, Writeable}; use crate::io; use crate::prelude::*; @@ -312,12 +312,9 @@ impl OnchainTxHandler self.channel_transaction_parameters.write(writer)?; - let mut key_data = VecWriter(Vec::new()); - self.signer.write(&mut key_data)?; - assert!(key_data.0.len() < core::usize::MAX); - assert!(key_data.0.len() < core::u32::MAX as usize); - (key_data.0.len() as u32).write(writer)?; - writer.write_all(&key_data.0[..])?; + // Write a zero-length signer. The data is no longer deserialized as of version 0.0.113 and + // downgrades before version 0.0.113 are no longer supported as of version 0.0.119. + 0u32.write(writer)?; writer.write_all(&(self.pending_claim_requests.len() as u64).to_be_bytes())?; for (ref ancestor_claim_txid, request) in self.pending_claim_requests.iter() {