diff --git a/src/llmq/instantsend.cpp b/src/llmq/instantsend.cpp index 572c0379ad..b86d46f571 100644 --- a/src/llmq/instantsend.cpp +++ b/src/llmq/instantsend.cpp @@ -326,10 +326,10 @@ CInstantSendLockPtr CInstantSendDb::GetInstantSendLockByHash(const uint256& hash ret = std::make_shared(CInstantSendLock::isdlock_version); bool exists = db->Read(std::make_tuple(DB_ISLOCK_BY_HASH, hash), *ret); - if (!exists) { + if (!exists || (::SerializeHash(*ret) != hash)) { ret = std::make_shared(); exists = db->Read(std::make_tuple(DB_ISLOCK_BY_HASH, hash), *ret); - if (!exists) { + if (!exists || (::SerializeHash(*ret) != hash)) { ret = nullptr; } }