Commit graph

8 commits

Author SHA1 Message Date
Hennadii Stepanov
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
Sebastian Falbesoner
16bd283b3a Reapply "test: p2p: check that connecting to ourself leads to disconnect"
This reverts commit 9ec2c53701 with
a tiny change included (identation of the wait_until call).
2024-07-09 21:36:35 +02:00
Sebastian Falbesoner
9ec2c53701 Revert "test: p2p: check that connecting to ourself leads to disconnect"
This reverts commit 5d2fb14baf and
adds a TODO to add it later again once the race condition is fixed.
2024-07-01 20:53:16 +02:00
Sebastian Falbesoner
5d2fb14baf test: p2p: check that connecting to ourself leads to disconnect
The "connect to ourself" detection logic has been first introduced
by Satoshi in October 2009, together with a couple of other changes
and a version bump to "v0.1.6 BETA" (see commit
cc0b4c3b62).
2024-06-29 00:30:14 +02:00
stratospher
6b02c11d66 test: Fix intermittent issue in p2p_handshake.py
If we reuse the same port when disconnecting and establishing connections
again, we might hit this scenario:
- disconnection is done on python side for P2PConnection
- disconnection is not complete on c++ side for TestNode
- we're trying to establish a new connection on same port again

Prevent this scenario from happening by ensuring disconnection on c++
side for TestNode as well.
2024-04-19 00:33:45 +05:30
stickies-v
032a597482
test: make p2p_handshake robust against timeoffset warnings
The test requires that limited nodes are not peered with  when
the node's system time exceeds ~ 24h of the node's chaintip
timestamp, as per PeerManagerImpl::GetDesirableServiceFlags.

By patching this test to modify the timestamp of the chaintip as
opposed to mocking the node's system time, we make it resilient
to future commits where the node raises a warning if it detects
its system time is too much out of sync with its outbound peers.

See https://github.com/bitcoin/bitcoin/pull/29623
2024-03-22 14:36:52 +00:00
Sebastian Falbesoner
2f23987849 test: p2p: check limited peers desirability (depending on best block depth)
This adds coverage for the logic introduced in PR #28170
("p2p: adaptive connections services flags").
2024-03-11 15:30:14 +01:00
Sebastian Falbesoner
c4a67d396d test: p2p: check disconnect due to lack of desirable service flags 2024-03-11 15:23:09 +01:00