[wallet] Store the block height and timestamp after syncing

Closes #455
This commit is contained in:
Alekos Filini
2021-10-23 15:25:49 +02:00
parent 12e51b3c06
commit 7c06f52a07
2 changed files with 18 additions and 0 deletions

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(())
}