Skip to content

Commit

Permalink
Decouple lifetimes for trait implementations that used to comprise Ke…
Browse files Browse the repository at this point in the history
…ysInterface.
  • Loading branch information
arik-so committed Jan 13, 2023
1 parent 72183bd commit 49c1f30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lightning/src/chain/channelmonitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3704,9 +3704,9 @@ where

const MAX_ALLOC_SIZE: usize = 64*1024;

impl<'a, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'a SP)>
impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP)>
for (BlockHash, ChannelMonitor<SP::Signer>) {
fn read<R: io::Read>(reader: &mut R, args: (&'a ES, &'a SP)) -> Result<Self, DecodeError> {
fn read<R: io::Read>(reader: &mut R, args: (&'a ES, &'b SP)) -> Result<Self, DecodeError> {
macro_rules! unwrap_obj {
($key: expr) => {
match $key {
Expand Down
4 changes: 2 additions & 2 deletions lightning/src/chain/onchaintx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
}
}

impl<'a, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'a SP, u64, [u8; 32])> for OnchainTxHandler<SP::Signer> {
fn read<R: io::Read>(reader: &mut R, args: (&'a ES, &'a SP, u64, [u8; 32])) -> Result<Self, DecodeError> {
impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP, u64, [u8; 32])> for OnchainTxHandler<SP::Signer> {
fn read<R: io::Read>(reader: &mut R, args: (&'a ES, &'b SP, u64, [u8; 32])) -> Result<Self, DecodeError> {
let entropy_source = args.0;
let signer_provider = args.1;
let channel_value_satoshis = args.2;
Expand Down
4 changes: 2 additions & 2 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6331,12 +6331,12 @@ impl<Signer: Sign> Writeable for Channel<Signer> {
}

const MAX_ALLOC_SIZE: usize = 64*1024;
impl<'a, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'a SP, u32)> for Channel<<SP::Target as SignerProvider>::Signer>
impl<'a, 'b, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32)> for Channel<<SP::Target as SignerProvider>::Signer>
where
ES::Target: EntropySource,
SP::Target: SignerProvider
{
fn read<R : io::Read>(reader: &mut R, args: (&'a ES, &'a SP, u32)) -> Result<Self, DecodeError> {
fn read<R : io::Read>(reader: &mut R, args: (&'a ES, &'b SP, u32)) -> Result<Self, DecodeError> {
let (entropy_source, signer_provider, serialized_height) = args;
let ver = read_ver_prefix!(reader, SERIALIZATION_VERSION);

Expand Down

0 comments on commit 49c1f30

Please sign in to comment.