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