@@ -20,7 +20,7 @@ extern crate libc;
20
20
use bitcoin:: hash_types:: { BlockHash , Txid } ;
21
21
use bitcoin:: hashes:: hex:: FromHex ;
22
22
use lightning:: chain:: channelmonitor:: ChannelMonitor ;
23
- use lightning:: chain:: keysinterface:: { EntropySource , SignerProvider } ;
23
+ use lightning:: chain:: keysinterface:: { EntropySource , SignerProvider , WriteableEcdsaChannelSigner } ;
24
24
use lightning:: util:: ser:: { ReadableArgs , Writeable } ;
25
25
use lightning:: util:: persist:: KVStorePersister ;
26
26
use std:: fs;
@@ -59,12 +59,11 @@ impl FilesystemPersister {
59
59
}
60
60
61
61
/// Read `ChannelMonitor`s from disk.
62
- pub fn read_channelmonitors < ES : Deref , SP : Deref > (
63
- & self , entropy_source : ES , signer_provider : SP
64
- ) -> std :: io :: Result < Vec < ( BlockHash , ChannelMonitor < < SP :: Target as SignerProvider > :: Signer > ) > >
62
+ pub fn read_channelmonitors < ES : Deref , WES : WriteableEcdsaChannelSigner , SP : SignerProvider < Signer = WES > + Sized , SPD : Deref < Target = SP > > (
63
+ & self , entropy_source : ES , signer_provider : SPD
64
+ ) -> Result < Vec < ( BlockHash , ChannelMonitor < WES > ) > , std :: io :: Error >
65
65
where
66
66
ES :: Target : EntropySource + Sized ,
67
- SP :: Target : SignerProvider + Sized
68
67
{
69
68
let mut path = PathBuf :: from ( & self . path_to_channel_data ) ;
70
69
path. push ( "monitors" ) ;
@@ -105,7 +104,7 @@ impl FilesystemPersister {
105
104
106
105
let contents = fs:: read ( & file. path ( ) ) ?;
107
106
let mut buffer = Cursor :: new ( & contents) ;
108
- match <( BlockHash , ChannelMonitor < < SP :: Target as SignerProvider > :: Signer > ) >:: read ( & mut buffer, ( & * entropy_source, & * signer_provider) ) {
107
+ match <( BlockHash , ChannelMonitor < WES > ) >:: read ( & mut buffer, ( & * entropy_source, & * signer_provider) ) {
109
108
Ok ( ( blockhash, channel_monitor) ) => {
110
109
if channel_monitor. get_funding_txo ( ) . 0 . txid != txid || channel_monitor. get_funding_txo ( ) . 0 . index != index {
111
110
return Err ( std:: io:: Error :: new ( std:: io:: ErrorKind :: InvalidData ,
0 commit comments