@@ -53,11 +53,12 @@ impl<Signer: Sign> DiskWriteable for ChannelMonitor<Signer> {
53
53
}
54
54
55
55
impl < Signer : Sign , M : Deref , T : Deref , K : Deref , F : Deref , L : Deref > DiskWriteable for ChannelManager < Signer , M , T , K , F , L >
56
- where M :: Target : chain:: Watch < Signer > ,
57
- T :: Target : BroadcasterInterface ,
58
- K :: Target : KeysInterface < Signer =Signer > ,
59
- F :: Target : FeeEstimator ,
60
- L :: Target : Logger
56
+ where
57
+ M :: Target : chain:: Watch < Signer > ,
58
+ T :: Target : BroadcasterInterface ,
59
+ K :: Target : KeysInterface < Signer =Signer > ,
60
+ F :: Target : FeeEstimator ,
61
+ L :: Target : Logger
61
62
{
62
63
fn write_to_file ( & self , writer : & mut fs:: File ) -> Result < ( ) , std:: io:: Error > {
63
64
self . write ( writer)
@@ -90,11 +91,12 @@ impl FilesystemPersister {
90
91
data_dir : String ,
91
92
manager : & ChannelManager < Signer , M , T , K , F , L >
92
93
) -> Result < ( ) , std:: io:: Error >
93
- where M :: Target : chain:: Watch < Signer > ,
94
- T :: Target : BroadcasterInterface ,
95
- K :: Target : KeysInterface < Signer =Signer > ,
96
- F :: Target : FeeEstimator ,
97
- L :: Target : Logger
94
+ where
95
+ M :: Target : chain:: Watch < Signer > ,
96
+ T :: Target : BroadcasterInterface ,
97
+ K :: Target : KeysInterface < Signer =Signer > ,
98
+ F :: Target : FeeEstimator ,
99
+ L :: Target : Logger
98
100
{
99
101
let path = PathBuf :: from ( data_dir) ;
100
102
util:: write_to_file ( path, "manager" . to_string ( ) , manager)
@@ -106,7 +108,7 @@ impl FilesystemPersister {
106
108
pub fn read_channelmonitors < Signer : Sign , K : Deref > (
107
109
& self , keys_manager : K
108
110
) -> Result < HashMap < OutPoint , ( BlockHash , ChannelMonitor < Signer > ) > , std:: io:: Error >
109
- where K :: Target : KeysInterface < Signer =Signer > + Sized
111
+ where K :: Target : KeysInterface < Signer =Signer > + Sized
110
112
{
111
113
let path = self . path_to_monitor_data ( ) ;
112
114
if !Path :: new ( & path) . exists ( ) {
@@ -163,13 +165,13 @@ impl<ChannelSigner: Sign> channelmonitor::Persist<ChannelSigner> for FilesystemP
163
165
fn persist_new_channel ( & self , funding_txo : OutPoint , monitor : & ChannelMonitor < ChannelSigner > ) -> Result < ( ) , ChannelMonitorUpdateErr > {
164
166
let filename = format ! ( "{}_{}" , funding_txo. txid. to_hex( ) , funding_txo. index) ;
165
167
util:: write_to_file ( self . path_to_monitor_data ( ) , filename, monitor)
166
- . map_err ( |_| ChannelMonitorUpdateErr :: PermanentFailure )
168
+ . map_err ( |_| ChannelMonitorUpdateErr :: PermanentFailure )
167
169
}
168
170
169
171
fn update_persisted_channel ( & self , funding_txo : OutPoint , _update : & ChannelMonitorUpdate , monitor : & ChannelMonitor < ChannelSigner > ) -> Result < ( ) , ChannelMonitorUpdateErr > {
170
172
let filename = format ! ( "{}_{}" , funding_txo. txid. to_hex( ) , funding_txo. index) ;
171
173
util:: write_to_file ( self . path_to_monitor_data ( ) , filename, monitor)
172
- . map_err ( |_| ChannelMonitorUpdateErr :: PermanentFailure )
174
+ . map_err ( |_| ChannelMonitorUpdateErr :: PermanentFailure )
173
175
}
174
176
}
175
177
0 commit comments