mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 09:53:47 +01:00
[net_processing] Provide debug error if code assumptions change.
Currently, this call to SetupAddressRelay will never return false because of the previous guard that returns early if the peer is not an inbound connection. Rather than implicitly relying on this guarantee, throw an error in the debug build if it ever changes.
This commit is contained in:
parent
aa79c91260
commit
9778b0fec1
@ -3744,7 +3744,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
return;
|
||||
}
|
||||
|
||||
SetupAddressRelay(pfrom, *peer);
|
||||
// Since this must be an inbound connection, SetupAddressRelay will
|
||||
// never fail.
|
||||
Assume(SetupAddressRelay(pfrom, *peer));
|
||||
|
||||
// Only send one GetAddr response per connection to reduce resource waste
|
||||
// and discourage addr stamping of INV announcements.
|
||||
|
Loading…
Reference in New Issue
Block a user