Commit graph

13 commits

Author SHA1 Message Date
MarcoFalke
faa51ef4d3
test: Fix intermittent issue in p2p_addr_relay.py 2021-04-28 08:16:29 +02:00
MarcoFalke
fa37116c82
test: Use self.send_addr_msg 2021-04-28 08:13:05 +02:00
Amiti Uttarwar
a732ee353c [test] Add tests for addr relay in -blocksonly mode
Co-Authored-By: Martin Zumsande <mzumsande@gmail.com>
2021-04-21 22:34:10 +02:00
Martin Zumsande
a6694eaed8 [test] Add address relay tests involving outbound peers
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
2021-04-21 22:34:03 +02:00
Martin Zumsande
8188b77c17 [test] Add tests for getaddr behavior
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
2021-04-21 22:16:39 +02:00
Amiti Uttarwar
d2dbfe6ff1 [test] Extract sending an addr message into a helper
Also reduces mocktime to prevent idle disconnects
Co-Authored-By: Martin Zumsande <mzumsande@gmail.com>
2021-04-21 22:16:39 +02:00
Amiti Uttarwar
c991943399 [test] Refactor the addr relay test to prepare for new tests
Moves setting up the addr message into a repeatable function, and breaks up the
existing tests into separate functions for legibility.
2021-04-21 22:14:16 +02:00
Fabian Jahr
590bda79e8
scripted-diff: Remove setup_clean_chain if default is not changed
-BEGIN VERIFY SCRIPT-
git grep -l "self.setup_clean_chain = False" test/functional/*.py | xargs sed -i "/self.setup_clean_chain = False/d";
-END VERIFY SCRIPT-
2021-02-01 23:13:38 +01:00
Vasil Dimov
7fabe0f359
net: don't relay to the address' originator
For each address to be relayed we "randomly" pick 2 nodes to send the
address to (in `RelayAddress()`). However we do not take into
consideration that it does not make sense to relay the address back to
its originator (`CNode::PushAddress()` will do nothing in that case).

This means that if the originator is among the "randomly" picked nodes,
then we will relay to one node less than intended.

Fix this by skipping the originating node when choosing candidates to
relay to.
2020-12-10 14:41:41 +01:00
John Newbery
5e8df3312e test: resort imports 2020-08-21 15:53:59 +01:00
John Newbery
85165d4332 scripted-diff: Rename mininode to p2p
-BEGIN VERIFY SCRIPT-
sed -i 's/\.mininode/\.p2p/g' $(git grep -l "mininode")
git mv test/functional/test_framework/mininode.py test/functional/test_framework/p2p.py
-END VERIFY SCRIPT-
2020-08-21 15:52:20 +01:00
Jon Atack
9fa494dc09
net: update misbehavior logging for oversized messages
so that oversized ADDR, GETDATA, HEADERS and INV messages print
the same consistent debug logs.
2020-06-19 14:14:16 +02:00
MarcoFalke
fa1da3d4bf
test: Add basic addr relay test 2020-04-02 23:29:32 +08:00