tx: ability to delete transaction from database

This commit is contained in:
ardocrat
2026-03-21 22:48:52 +03:00
parent 5aa02fdea3
commit c4f473568f
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -696,6 +696,16 @@ where
Ok(())
}
fn delete_tx_log_entry(&mut self, tx_id: u32, parent_id: &Identifier) -> Result<(), Error> {
let tx_log_key = to_key_u64(
TX_LOG_ENTRY_PREFIX,
&mut parent_id.to_bytes().to_vec(),
tx_id as u64,
);
self.db.borrow().as_ref().unwrap().delete(&tx_log_key)?;
Ok(())
}
fn save_acct_path(&mut self, mapping: AcctPathMapping) -> Result<(), Error> {
let acct_key = to_key(
ACCOUNT_PATH_MAPPING_PREFIX,
+3
View File
@@ -287,6 +287,9 @@ where
/// save a tx log entry
fn save_tx_log_entry(&mut self, t: TxLogEntry, parent_id: &Identifier) -> Result<(), Error>;
/// delete a tx log entry
fn delete_tx_log_entry(&mut self, tx_id: u32, parent_id: &Identifier) -> Result<(), Error>;
/// save an account label -> path mapping
fn save_acct_path(&mut self, mapping: AcctPathMapping) -> Result<(), Error>;