Merge bitcoin/bitcoin#27743: p2p: Unconditionally return when compact block status == READ_STATUS_FAILED

d972695797 Unconditionally return when compact block status == READ_STATUS_FAILED (Greg Sanders)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1204491894 which would have resulted in wasted bandwidth every once in a while.

ACKs for top commit:
  Sjors:
    utACK d972695797
  mzumsande:
    ACK d972695797

Tree-SHA512: 2483cae03093fc61b36279bbc455829822258703ae608ff2797a20449410b12bfe8d40de63c02fc79ed4ef4d91b34c63281b71b81a1c691cab9647b65761586f
This commit is contained in:
fanquake 2023-05-25 09:52:36 +01:00
commit e43432086a
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -4365,11 +4365,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
std::vector<CInv> vInv(1);
vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(*peer), blockhash);
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::GETDATA, vInv));
return;
} else {
// Give up for this peer and wait for other peer(s)
RemoveBlockRequest(pindex->GetBlockHash(), pfrom.GetId());
}
return;
}
BlockTransactionsRequest req;