Commit Graph

16 Commits

Author SHA1 Message Date
937ef9eb40 net_processing: use CNode::DisconnectMsg helper
This is not a pure refactor:
1. It slightly changes the log messages, as reflected in the test changes
2. It adds the IP address to all disconnect logging (when fLogIPs is set)
2024-11-26 13:22:55 +01:00
a0473442d1 scripted-diff: Add __file__ argument to BitcoinTestFramework.init()
-BEGIN VERIFY SCRIPT-
sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py)
sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py
-END VERIFY SCRIPT-
2024-07-16 22:06:47 +01:00
c340503b67 test: p2p: adhere to typical VERSION message protocol flow
The test framework's p2p implementation currently sends out it's VERSION
message immediately after an inbound connection (i.e. TestNode outbound
connection) is made. This doesn't follow the usual protocol flow where
the initiator sends a version first, and the responders processes that
and only then responds with its own version message. Change that
accordingly by only sending immediate VERSION message for outbound
connections (or after v2 handshake for v2 connections, respectively),
and sending out VERSION messages as response for incoming VERSION
messages (i.e. in the function `on_version`) for inbound connections.

Note that some of the overruled `on_version` methods in functional tests
needed to be changed to send the version explicitly.
2024-02-01 13:33:23 +01:00
46339d29b1 test, refactor: Reorder sendtxrcncl tests for better readability 2022-11-14 12:04:08 +02:00
14263c13f1 p2p, refactor: Extend logs for unexpected sendtxrcncl 2022-11-14 12:04:07 +02:00
00c5dec818 p2p: Clarify sendtxrcncl policies 2022-11-14 11:40:17 +02:00
ac6ee5ba21 test: Expand unit and functional tests for txreconciliation 2022-11-14 11:40:15 +02:00
a60f729e29 p2p: Drop roles from sendtxrcncl
This feature was currently redundant (although could have provided
more flexibility in the future), and already been causing confusion.
2022-11-10 09:21:57 +02:00
6772cbf69c tests: stabilize sendtxrcncl test 2022-11-08 12:18:48 +02:00
74d975318a test: fix intermittent failure in p2p_sendtxrcncl.py
Using disconnect_p2ps instead of peer_disconnect makes
the node wait for the disconnect to complete. As a result,
we can reuse p2p_idx=0 in the add_outbound_p2p_connection calls.
2022-11-03 16:41:50 -04:00
fa24239a1c net: Avoid SetTxRelay for feeler connections 2022-10-27 16:09:33 +02:00
fa3da8307b test: Check debug log as well in p2p_sendtxrcncl.py 2022-10-25 13:26:36 +02:00
fae0439486 test: Check correct disconnect reason in p2p_sendtxrcncl.py
Previously it disconnected due to "sendtxrcncl received after verack",
now it disconnects for the correct reason.
2022-10-25 13:26:29 +02:00
fa590cfaae test: Fix intermittent issue in p2p_sendtxrcncl.py 2022-10-24 16:07:23 +02:00
e56d1d2afd test: Add functional tests for sendtxrcncl message from outbound 2022-10-17 12:36:14 +03:00
cfcef60779 test: Add functional tests for sendtxrcncl from inbound 2022-10-17 12:36:13 +03:00