Disable diffusion for outbound connections
Describe the bug
We use whitelisting for faster transaction propagation in functional tests. However it turned out that argument -whitelist=127.0.0.1 is simply not applied for outgoing connections.
We didn't discover this earlier because according to this, maximum outbound delay is approximately one minute. And this one minute was our default wait timeout (before we changed it to 150 seconds).
One obvious solution is to use bidirectional connections, but this does not stack up with dandelion/embargoman: it will anyway select an outbound connection.
Expected behavior
I would expect -whitelist=127.0.0.1 to disable diffusion completely, regardless of type of connection
Additional context In most of the cases this issue is not a big problem, since we already have timeouts that are greater than potential delay. But it appeared in some tests which were naively setting timeout to a smaller value. Additionally, this whole diffusion adds some execution time for tests
If that's the current behaviour and we just assumed it's different, is it really a bug?
I was not sure which label/issue type to choose. Feel free to change to appropriate type
Ok it's more that it's changing the approach to the issue from - "it's not working we need to fix it" to "that's the current Bitcoin Core behaviour, let's understand how / whether we should change it"