Also stop asking other peers for a TX when ProcessTxLockRequest fails (#2529)
This is moving up the RemoveAskFor call above the ProcessTxLockRequest call. If ProcessTxLockRequest fails, we should not re-request the same TX/IX from other nodes as it will continue to fail.
This commit is contained in:
parent
19a6f718d3
commit
7c75008642
@ -2037,6 +2037,10 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||
|
||||
CInv inv(nInvType, tx.GetHash());
|
||||
pfrom->AddInventoryKnown(inv);
|
||||
{
|
||||
LOCK(cs_main);
|
||||
connman.RemoveAskFor(inv.hash);
|
||||
}
|
||||
|
||||
// Process custom logic, no matter if tx will be accepted to mempool later or not
|
||||
if (strCommand == NetMsgType::TXLOCKREQUEST || fCanAutoLock) {
|
||||
@ -2083,8 +2087,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||
|
||||
LOCK(cs_main);
|
||||
|
||||
connman.RemoveAskFor(inv.hash);
|
||||
|
||||
bool fMissingInputs = false;
|
||||
CValidationState state;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user