< bitcoin-git>
[bitcoin] fanquake opened pull request #17800: random: don't special case clock usage on macOS (master...random_macos_clocks) https://github.com/bitcoin/bitcoin/pull/17800
< gleb>
Is there a way to trick functional tests to think that nodes are not connected locally? Like, so that addr is not 127.0.0.1
< gwillen>
gleb: I don't know if they're checking for 127.0.0.1 specifically, but you can use anything in 127.* and it will work as localhost
< gwillen>
if that doesn't work, you can also use your own external IP, and see if it is able to catch that
< gleb>
No, it's like *I need* the node to think that a connection between 2 regtest nodes is not local. So that they see each other as something from the internet
< gwillen>
right, that's what I'm saying -- try giving it 127.0.0.2 to connect to, and see if it believes that's not local
< gwillen>
or if your LAN IP is 192.168.1.99, try giving it that
< gwillen>
it will still connect locally but the IP will be different
< gwillen>
(but if it's connecting to itself automatically and you don't supply the IP, then I'm not sure)
< gleb>
gwillen: Thanks. I gave up and tested manually. If you have a bit more time, perhaps looking at the last comment in 16702 would let you know what I want to achieve better, cuz it's hard to explain without context. If not -- no worries, at this point I feel like there is no good answer anyway =\
< gwillen>
gleb: I do see what you mean (and it turns out that none of my suggestions would work anyway, since all of the addresses I suggested will identify as "local")
< gwillen>
or rather as !routable
< gwillen>
I'm having a little trouble tracing the code you're describing because I can't find what the thing is that you're calling an asmap
< gwillen>
I assume that's "AS map" but I couldn't turn anything up searching
< gwillen>
where is the codepath in core that deals in those?
< gwillen>
(also thanks)
< sipa>
gwillen: #16702
< gribble>
https://github.com/bitcoin/bitcoin/issues/16702 | p2p: supplying and using asmap to improve IP bucketing in addrman by naumenkogs . Pull Request #16702 . bitcoin/bitcoin . GitHub
< gwillen>
oh, it was new in the PR, that's why I couldn't find it. XD thanks.
< pinheadmz>
gleb: is there any sense in "allowing" local connections in regtest mode only? you'd still have to shim in a ASN number for 127.0.0.1 ...
< gleb>
pinheadmz: I'm not sure what you're asking. But it seems like you agree that testing this behaviour is too complicated that we probably can omit it.
< gwillen>
pinheadmz: it seems like you'd have to shim multiple ones, to test meaningfully
< gwillen>
but I guess you could do that with a fake asmap data file
< gwillen>
in the code, you would just need to disable the check for local addresses for testing
< gwillen>
and it does make _some_ sense to just remove all the nonroutable checks in regtest, potentially
< pinheadmz>
yeah agreed, and the rpc output isnt the point of the PR anyway :-)