File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1149,6 +1149,8 @@ impl Node {
1149
1149
& * sync_cmon as & ( dyn Confirm + Sync + Send ) ,
1150
1150
& * sync_sweeper as & ( dyn Confirm + Sync + Send ) ,
1151
1151
] ;
1152
+ let sync_wallet_timestamp = Arc :: clone ( & self . latest_wallet_sync_timestamp ) ;
1153
+ let sync_onchain_wallet_timestamp = Arc :: clone ( & self . latest_onchain_wallet_sync_timestamp ) ;
1152
1154
let sync_monitor_archival_height = Arc :: clone ( & self . latest_channel_monitor_archival_height ) ;
1153
1155
1154
1156
tokio:: task:: block_in_place ( move || {
@@ -1162,6 +1164,11 @@ impl Node {
1162
1164
"Sync of on-chain wallet finished in {}ms." ,
1163
1165
now. elapsed( ) . as_millis( )
1164
1166
) ;
1167
+ let unix_time_secs_opt = SystemTime :: now ( )
1168
+ . duration_since ( UNIX_EPOCH )
1169
+ . ok ( )
1170
+ . map ( |d| d. as_secs ( ) ) ;
1171
+ * sync_onchain_wallet_timestamp. write ( ) . unwrap ( ) = unix_time_secs_opt;
1165
1172
} ,
1166
1173
Err ( e) => {
1167
1174
log_error ! ( sync_logger, "Sync of on-chain wallet failed: {}" , e) ;
@@ -1178,6 +1185,12 @@ impl Node {
1178
1185
now. elapsed( ) . as_millis( )
1179
1186
) ;
1180
1187
1188
+ let unix_time_secs_opt = SystemTime :: now ( )
1189
+ . duration_since ( UNIX_EPOCH )
1190
+ . ok ( )
1191
+ . map ( |d| d. as_secs ( ) ) ;
1192
+ * sync_wallet_timestamp. write ( ) . unwrap ( ) = unix_time_secs_opt;
1193
+
1181
1194
periodically_archive_fully_resolved_monitors (
1182
1195
archive_cman,
1183
1196
archive_cmon,
You can’t perform that action at this time.
0 commit comments