mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Also invoke WriteInstantSendLockMined when IS lock comes after the mined block (#2861)
This commit is contained in:
parent
f32f9523b9
commit
7fe1a4a78b
@ -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);
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user