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 @@ -1098,6 +1098,8 @@ impl Node {
1098
1098
& * sync_cmon as & ( dyn Confirm + Sync + Send ) ,
1099
1099
& * sync_sweeper as & ( dyn Confirm + Sync + Send ) ,
1100
1100
] ;
1101
+ let sync_wallet_timestamp = Arc :: clone ( & self . latest_wallet_sync_timestamp ) ;
1102
+ let sync_onchain_wallet_timestamp = Arc :: clone ( & self . latest_onchain_wallet_sync_timestamp ) ;
1101
1103
let sync_monitor_archival_height = Arc :: clone ( & self . latest_channel_monitor_archival_height ) ;
1102
1104
1103
1105
tokio:: task:: block_in_place ( move || {
@@ -1111,6 +1113,11 @@ impl Node {
1111
1113
"Sync of on-chain wallet finished in {}ms." ,
1112
1114
now. elapsed( ) . as_millis( )
1113
1115
) ;
1116
+ let unix_time_secs_opt = SystemTime :: now ( )
1117
+ . duration_since ( UNIX_EPOCH )
1118
+ . ok ( )
1119
+ . map ( |d| d. as_secs ( ) ) ;
1120
+ * sync_onchain_wallet_timestamp. write ( ) . unwrap ( ) = unix_time_secs_opt;
1114
1121
} ,
1115
1122
Err ( e) => {
1116
1123
log_error ! ( sync_logger, "Sync of on-chain wallet failed: {}" , e) ;
@@ -1127,6 +1134,12 @@ impl Node {
1127
1134
now. elapsed( ) . as_millis( )
1128
1135
) ;
1129
1136
1137
+ let unix_time_secs_opt = SystemTime :: now ( )
1138
+ . duration_since ( UNIX_EPOCH )
1139
+ . ok ( )
1140
+ . map ( |d| d. as_secs ( ) ) ;
1141
+ * sync_wallet_timestamp. write ( ) . unwrap ( ) = unix_time_secs_opt;
1142
+
1130
1143
periodically_archive_fully_resolved_monitors (
1131
1144
archive_cman,
1132
1145
archive_cmon,
You can’t perform that action at this time.
0 commit comments