From 510944777ca2c1b918c2cd73ad59d41150b4b8fb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 13 Jul 2023 01:05:18 +0000 Subject: [PATCH] Transactionally modify the wallet DB in `replace_queue_entries` We don't want to delete old scan range queue entries unless we are guaranteed to write the updated queue entries. --- zcash_client_sqlite/src/wallet/scanning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_client_sqlite/src/wallet/scanning.rs b/zcash_client_sqlite/src/wallet/scanning.rs index aca6a7b3a..0e7e47a68 100644 --- a/zcash_client_sqlite/src/wallet/scanning.rs +++ b/zcash_client_sqlite/src/wallet/scanning.rs @@ -426,7 +426,7 @@ pub(crate) fn insert_queue_entries<'a>( } pub(crate) fn replace_queue_entries( - conn: &rusqlite::Connection, + conn: &rusqlite::Transaction<'_>, query_range: &Range, entries: impl Iterator, ) -> Result<(), SqliteClientError> {