[wallet] Store the block height and timestamp after syncing

Closes #455
This commit is contained in:
Alekos Filini committed 2021-11-10 12:30:02 +01:00
1 parent 12e51b3c06
commit 7c06f52a07
2 files changed
+18

No files matched your search

+9
View File
@@ -1554,6 +1554,15 @@ where
}
}
let last_sync_time = ConfirmationTime {
height: maybe_await!(self.client.get_height())?,
timestamp: time::get_timestamp(),
};
debug!("Saving `last_sync_time` = {:?}", last_sync_time);
self.database
.borrow_mut()
.set_last_sync_time(last_sync_time)?;
Ok(())
}