mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
Merge pull request #746 from GetGrin/tx_delete
Ability to delete transaction from database
This commit is contained in:
@@ -696,6 +696,16 @@ where
|
|||||||
Ok(())
|
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> {
|
fn save_acct_path(&mut self, mapping: AcctPathMapping) -> Result<(), Error> {
|
||||||
let acct_key = to_key(
|
let acct_key = to_key(
|
||||||
ACCOUNT_PATH_MAPPING_PREFIX,
|
ACCOUNT_PATH_MAPPING_PREFIX,
|
||||||
|
|||||||
@@ -287,6 +287,9 @@ where
|
|||||||
/// save a tx log entry
|
/// save a tx log entry
|
||||||
fn save_tx_log_entry(&mut self, t: TxLogEntry, parent_id: &Identifier) -> Result<(), Error>;
|
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
|
/// save an account label -> path mapping
|
||||||
fn save_acct_path(&mut self, mapping: AcctPathMapping) -> Result<(), Error>;
|
fn save_acct_path(&mut self, mapping: AcctPathMapping) -> Result<(), Error>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user