zcash_client_sqlite: Cache statement for `wallet::prune_nullifier_map`
This commit is contained in:
parent
e773cd3ed4
commit
0f6970aefd
|
@ -1474,12 +1474,13 @@ pub(crate) fn prune_nullifier_map(
|
|||
conn: &rusqlite::Transaction<'_>,
|
||||
block_height: BlockHeight,
|
||||
) -> Result<(), SqliteClientError> {
|
||||
conn.execute(
|
||||
let mut stmt_delete_locators = conn.prepare_cached(
|
||||
"DELETE FROM tx_locator_map
|
||||
WHERE block_height < :block_height",
|
||||
named_params![":block_height": u32::from(block_height)],
|
||||
)?;
|
||||
|
||||
stmt_delete_locators.execute(named_params![":block_height": u32::from(block_height)])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue