Log message

This commit is contained in:
Hanh 2023-01-04 22:58:42 +08:00
parent 8dcd064b3e
commit b9726bf293
1 changed files with 2 additions and 2 deletions

View File

@ -753,14 +753,14 @@ impl DbAdapter {
// Only keep the oldest checkpoint in [low, high)
fn prune_interval(&mut self, low: u32, high: u32) -> anyhow::Result<()> {
log::info!("prune_interval {} {}", low, high);
log::debug!("prune_interval {} {}", low, high);
let keep_height: Option<u32> = self.connection.query_row(
"SELECT MIN(height) FROM blocks WHERE height >= ?1 AND height < ?2",
params![low, high],
|row| row.get(0),
)?;
if let Some(keep_height) = keep_height {
log::info!("keep {}", keep_height);
log::info!("keep checkpoint {}", keep_height);
let transaction = self.connection.transaction()?;
transaction.execute(
"DELETE FROM sapling_witnesses WHERE height >= ?1 AND height < ?2 AND height != ?3",