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