Skip to content

Commit 6dfe913

Browse files
committed
Drop InMemorySigner Writeable impl
... which we haven't been using since 0.0.119 / commit 7a951b1.
1 parent 8c086c7 commit 6dfe913

File tree

2 files changed

+3
-38
lines changed

2 files changed

+3
-38
lines changed

lightning/src/sign/mod.rs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ use crate::ln::script::ShutdownScript;
5858
use crate::offers::invoice::UnsignedBolt12Invoice;
5959
use crate::offers::invoice_request::UnsignedInvoiceRequest;
6060
use crate::types::payment::PaymentPreimage;
61-
use crate::util::ser::{Readable, ReadableArgs, Writeable, Writer};
61+
use crate::util::ser::{Readable, ReadableArgs, Writeable};
6262
use crate::util::transaction_utils;
6363

6464
use crate::crypto::chacha20::ChaCha20;
65-
use crate::io::{self, Error};
65+
use crate::io;
6666
use crate::ln::msgs::DecodeError;
6767
use crate::prelude::*;
6868
use crate::sign::ecdsa::EcdsaChannelSigner;
@@ -1785,28 +1785,6 @@ impl TaprootChannelSigner for InMemorySigner {
17851785

17861786
const SERIALIZATION_VERSION: u8 = 1;
17871787

1788-
const MIN_SERIALIZATION_VERSION: u8 = 1;
1789-
1790-
impl Writeable for InMemorySigner {
1791-
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error> {
1792-
write_ver_prefix!(writer, SERIALIZATION_VERSION, MIN_SERIALIZATION_VERSION);
1793-
1794-
self.funding_key.write(writer)?;
1795-
self.revocation_base_key.write(writer)?;
1796-
self.payment_key.write(writer)?;
1797-
self.delayed_payment_base_key.write(writer)?;
1798-
self.htlc_base_key.write(writer)?;
1799-
self.commitment_seed.write(writer)?;
1800-
self.channel_parameters.write(writer)?;
1801-
self.channel_value_satoshis.write(writer)?;
1802-
self.channel_keys_id.write(writer)?;
1803-
1804-
write_tlv_fields!(writer, {});
1805-
1806-
Ok(())
1807-
}
1808-
}
1809-
18101788
impl<ES: Deref> ReadableArgs<ES> for InMemorySigner
18111789
where
18121790
ES::Target: EntropySource,

lightning/src/util/test_channel_signer.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use crate::ln::channel::{ANCHOR_OUTPUT_VALUE_SATOSHI, MIN_CHAN_DUST_LIMIT_SATOSHIS};
1111
use crate::ln::chan_utils::{HTLCOutputInCommitment, ChannelPublicKeys, HolderCommitmentTransaction, CommitmentTransaction, ChannelTransactionParameters, TrustedCommitmentTransaction, ClosingTransaction};
12-
use crate::ln::channel_keys::{HtlcKey};
12+
use crate::ln::channel_keys::HtlcKey;
1313
use crate::ln::msgs;
1414
use crate::types::payment::PaymentPreimage;
1515
use crate::sign::{InMemorySigner, ChannelSigner};
@@ -35,8 +35,6 @@ use bitcoin::secp256k1::{Secp256k1, ecdsa::Signature};
3535
#[cfg(taproot)]
3636
use musig2::types::{PartialSignature, PublicNonce};
3737
use crate::sign::HTLCDescriptor;
38-
use crate::util::ser::{Writeable, Writer};
39-
use crate::io::Error;
4038
use crate::types::features::ChannelTypeFeatures;
4139
#[cfg(taproot)]
4240
use crate::ln::msgs::PartialSignatureWithNonce;
@@ -402,17 +400,6 @@ impl TaprootChannelSigner for TestChannelSigner {
402400
}
403401
}
404402

405-
impl Writeable for TestChannelSigner {
406-
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error> {
407-
// TestChannelSigner has two fields - `inner` ([`InMemorySigner`]) and `state`
408-
// ([`EnforcementState`]). `inner` is serialized here and deserialized by
409-
// [`SignerProvider::read_chan_signer`]. `state` is managed by [`SignerProvider`]
410-
// and will be serialized as needed by the implementation of that trait.
411-
self.inner.write(writer)?;
412-
Ok(())
413-
}
414-
}
415-
416403
impl TestChannelSigner {
417404
fn verify_counterparty_commitment_tx<'a, T: secp256k1::Signing + secp256k1::Verification>(&self, commitment_tx: &'a CommitmentTransaction, secp_ctx: &Secp256k1<T>) -> TrustedCommitmentTransaction<'a> {
418405
commitment_tx.verify(

0 commit comments

Comments
 (0)