From a52ab696403ebb824618e0f18ef9f4e707648439 Mon Sep 17 00:00:00 2001
From: Alex Auvolat <alex@adnab.me>
Date: Tue, 23 Feb 2021 22:45:36 +0100
Subject: [PATCH] fix misuse of sled transactions

---
 src/table/table.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/table/table.rs b/src/table/table.rs
index 8389c29f..bcf407ec 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -431,7 +431,7 @@ where
 
 	pub(crate) fn delete_if_equal(self: &Arc<Self>, k: &[u8], v: &[u8]) -> Result<bool, Error> {
 		let removed = self.store.transaction(|txn| {
-			if let Some(cur_v) = self.store.get(k)? {
+			if let Some(cur_v) = txn.get(k)? {
 				if cur_v == v {
 					txn.remove(v)?;
 					return Ok(true);