From e8cc818ae52ee0cbfa36fa4fe3a21f84b1462581 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Fri, 4 Aug 2017 14:20:36 -0500 Subject: [PATCH] Properly deleting items from unchecked_cache. --- rai/secure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rai/secure.cpp b/rai/secure.cpp index 1ddf8d4d..99d1894f 100644 --- a/rai/secure.cpp +++ b/rai/secure.cpp @@ -2364,7 +2364,7 @@ std::vector > rai::block_store::unchecked_get (MDB_ void rai::block_store::unchecked_del (MDB_txn * transaction_a, rai::block_hash const & hash_a, rai::block const & block_a) { - for (auto i (unchecked_cache.begin ()), n (unchecked_cache.end ()); i != n && i->first == hash_a;) + for (auto i (unchecked_cache.find (hash_a)), n (unchecked_cache.end ()); i != n && i->first == hash_a;) { if (*i->second == block_a) {