mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
chainlocks: Relay clsig inv only after bestChainLock(Hash) are assigned (#3990)
Fixes a race condidion when we might reply with `notfound` to other nodes because we might still be waiting for locks here.
This commit is contained in:
parent
ebea362d06
commit
77e9a4a83b
@ -135,13 +135,13 @@ void CChainLocksHandler::ProcessNewChainLock(const NodeId from, const llmq::CCha
|
||||
return;
|
||||
}
|
||||
|
||||
g_connman->RelayInv(clsigInv, LLMQS_PROTO_VERSION);
|
||||
|
||||
{
|
||||
LOCK2(cs_main, cs);
|
||||
bestChainLockHash = hash;
|
||||
bestChainLock = clsig;
|
||||
|
||||
g_connman->RelayInv(clsigInv, LLMQS_PROTO_VERSION);
|
||||
|
||||
const CBlockIndex* pindex = LookupBlockIndex(clsig.blockHash);
|
||||
if (!pindex) {
|
||||
// we don't know the block/header for this CLSIG yet, so bail out for now
|
||||
|
Loading…
Reference in New Issue
Block a user