mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
rpc: warn that nodes ignore requests for old stale blocks
This is an anti-fingerprinting measure. See BlockRequestAllowed in net_processing. It has been around since 2014, but alternative clients might still serve these blocks. See also:d8b4b49667,85da07a5a0,a2be3b66b5,3788a8479b
This commit is contained in:
@@ -1738,6 +1738,8 @@ std::optional<std::string> PeerManagerImpl::FetchBlock(NodeId peer_id, const CBl
|
||||
LOCK(cs_main);
|
||||
|
||||
// Mark block as in-flight unless it already is (for this peer).
|
||||
// If the peer does not send us a block, vBlocksInFlight remains non-empty,
|
||||
// causing us to timeout and disconnect.
|
||||
// If a block was already in-flight for a different peer, its BLOCKTXN
|
||||
// response will be dropped.
|
||||
if (!BlockRequested(peer_id, block_index)) return "Already requested from this peer";
|
||||
|
||||
Reference in New Issue
Block a user