Skip to content

Commit 7fe1a4a

Browse files
codablockUdjinM6
authored andcommitted
Also invoke WriteInstantSendLockMined when IS lock comes after the mined block (#2861)
1 parent f32f952 commit 7fe1a4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/llmq/quorums_instantsend.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -718,10 +718,10 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, const uint256& has
718718

719719
CTransactionRef tx;
720720
uint256 hashBlock;
721+
const CBlockIndex* pindexMined = nullptr;
721722
// we ignore failure here as we must be able to propagate the lock even if we don't have the TX locally
722723
if (GetTransaction(islock.txid, tx, Params().GetConsensus(), hashBlock)) {
723724
if (!hashBlock.IsNull()) {
724-
const CBlockIndex* pindexMined;
725725
{
726726
LOCK(cs_main);
727727
pindexMined = mapBlockIndex.at(hashBlock);
@@ -764,6 +764,9 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, const uint256& has
764764
}
765765

766766
db.WriteNewInstantSendLock(hash, islock);
767+
if (pindexMined) {
768+
db.WriteInstantSendLockMined(hash, pindexMined->nHeight);
769+
}
767770
}
768771

769772
CInv inv(MSG_ISLOCK, hash);

0 commit comments

Comments
 (0)