Skip to content

Commit

Permalink
Also invoke WriteInstantSendLockMined when IS lock comes after the mi…
Browse files Browse the repository at this point in the history
…ned block (bitcoin#2861)
  • Loading branch information
codablock authored and UdjinM6 committed Apr 11, 2019
1 parent f32f952 commit 7fe1a4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/llmq/quorums_instantsend.cpp
Expand Up @@ -718,10 +718,10 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, const uint256& has

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

db.WriteNewInstantSendLock(hash, islock);
if (pindexMined) {
db.WriteInstantSendLockMined(hash, pindexMined->nHeight);
}
}

CInv inv(MSG_ISLOCK, hash);
Expand Down

0 comments on commit 7fe1a4a

Please sign in to comment.