Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
devrandom committed Apr 24, 2024
1 parent 02a856c commit 1a142e1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lightning/src/util/dyn_signer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! A dynamically dispatched signer

use core::any::Any;
use crate::io::Read;
use crate::io::{Read, Error};

use delegate::delegate;

Expand Down Expand Up @@ -42,7 +42,7 @@ pub trait InnerSign: EcdsaChannelSigner + Send + Sync {
/// Cast to Any for runtime type checking
fn as_any(&self) -> &dyn Any;
/// Serialize the signer
fn vwrite(&self, writer: &mut Vec<u8>) -> Result<(), std::io::Error>;
fn vwrite(&self, writer: &mut Vec<u8>) -> Result<(), Error>;
}

/// A ChannelSigner derived struct allowing run-time selection of a signer
Expand Down Expand Up @@ -174,7 +174,7 @@ impl ChannelSigner for DynSigner {
}

impl Writeable for DynSigner {
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), std::io::Error> {
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error> {
let inner = self.inner.as_ref();
let mut buf = Vec::new();
inner.vwrite(&mut buf)?;
Expand All @@ -191,7 +191,7 @@ impl InnerSign for InMemorySigner {
self
}

fn vwrite(&self, writer: &mut Vec<u8>) -> Result<(), std::io::Error> {
fn vwrite(&self, writer: &mut Vec<u8>) -> Result<(), Error> {
self.write(writer)
}
}
Expand Down Expand Up @@ -362,7 +362,6 @@ impl OutputSpender for DynPhantomKeysInterface {

impl DynKeysInterfaceTrait for DynPhantomKeysInterface {}

#[cfg(feature = "std")]
impl ReadableArgs<&DynKeysInterface> for DynSigner {
fn read<R: Read>(_reader: &mut R, _params: &DynKeysInterface) -> Result<Self, DecodeError> {
todo!()
Expand Down

0 comments on commit 1a142e1

Please sign in to comment.