From ae98eccfa90b0669d8dd77e7bc980e021b437ae1 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Fri, 10 May 2024 13:58:41 -0500 Subject: [PATCH] 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. --- lightning/src/chain/onchaintx.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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() { -- 2.39.5