use ln::{chan_utils, msgs};
use chain::keysinterface::{Sign, InMemorySigner, BaseSign};
+use io;
+use prelude::*;
use core::cmp;
-use std::sync::{Mutex, Arc};
+use sync::{Mutex, Arc};
use bitcoin::blockdata::transaction::{Transaction, SigHashType};
use bitcoin::util::bip143;
use bitcoin::secp256k1::key::{SecretKey, PublicKey};
use bitcoin::secp256k1::{Secp256k1, Signature};
use util::ser::{Writeable, Writer, Readable};
-use std::io::Error;
+use io::Error;
use ln::msgs::DecodeError;
/// Initial value for revoked commitment downward counter
///
/// Eventually we will probably want to expose a variant of this which would essentially
/// be what you'd want to run on a hardware wallet.
+///
+/// Note that before we do so we should ensure its serialization format has backwards- and
+/// forwards-compatibility prefix/suffixes!
#[derive(Clone)]
pub struct EnforcingSigner {
pub inner: InMemorySigner,
}
impl Readable for EnforcingSigner {
- fn read<R: ::std::io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
+ fn read<R: io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
let inner = Readable::read(reader)?;
let last_commitment_number = Readable::read(reader)?;
Ok(EnforcingSigner {