@@ -20,7 +20,7 @@ extern crate libc;
2020use bitcoin:: hash_types:: { BlockHash , Txid } ;
2121use bitcoin:: hashes:: hex:: FromHex ;
2222use lightning:: chain:: channelmonitor:: ChannelMonitor ;
23- use lightning:: chain:: keysinterface:: { EntropySource , SignerProvider } ;
23+ use lightning:: chain:: keysinterface:: { EntropySource , SignerProvider , WriteableEcdsaChannelSigner } ;
2424use lightning:: util:: ser:: { ReadableArgs , Writeable } ;
2525use lightning:: util:: persist:: KVStorePersister ;
2626use std:: fs;
@@ -59,12 +59,11 @@ impl FilesystemPersister {
5959 }
6060
6161 /// 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 >
6565 where
6666 ES :: Target : EntropySource + Sized ,
67- SP :: Target : SignerProvider + Sized
6867 {
6968 let mut path = PathBuf :: from ( & self . path_to_channel_data ) ;
7069 path. push ( "monitors" ) ;
@@ -105,7 +104,7 @@ impl FilesystemPersister {
105104
106105 let contents = fs:: read ( & file. path ( ) ) ?;
107106 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) ) {
109108 Ok ( ( blockhash, channel_monitor) ) => {
110109 if channel_monitor. get_funding_txo ( ) . 0 . txid != txid || channel_monitor. get_funding_txo ( ) . 0 . index != index {
111110 return Err ( std:: io:: Error :: new ( std:: io:: ErrorKind :: InvalidData ,
0 commit comments