commands: add a new 'delspendtx' command

This commit is contained in:
Antoine Poinsot committed 2022-10-01 14:05:27 +02:00
1 parent d5bd10add8
commit c73e8a42dd
8 files changed
+82

No files matched your search

+11
View File
@@ -392,6 +392,17 @@ impl SqliteConn {
)
.expect("Db must not fail")
}
pub fn delete_spend(&mut self, txid: &bitcoin::Txid) {
db_exec(&mut self.conn, |db_tx| {
db_tx.execute(
"DELETE FROM spend_transactions WHERE txid = ?1",
rusqlite::params![txid.to_vec()],
)?;
Ok(())
})
.expect("Db must not fail");
}
}
#[cfg(test)]