Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_timeouts.py
Show All 17 Lines | |||||
- Assert that we're still connected | - Assert that we're still connected | ||||
- Send a ping to no_verack_node and no_version_node | - Send a ping to no_verack_node and no_version_node | ||||
- Wait 31 seconds | - Wait 31 seconds | ||||
- Assert that we're no longer connected (timeout to receive version/verack is 60 seconds) | - Assert that we're no longer connected (timeout to receive version/verack is 60 seconds) | ||||
""" | """ | ||||
from time import sleep | from time import sleep | ||||
from test_framework.mininode import * | from test_framework.messages import msg_ping | ||||
from test_framework.mininode import network_thread_start, P2PInterface | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | |||||
class TestNode(P2PInterface): | class TestNode(P2PInterface): | ||||
def on_version(self, message): | def on_version(self, message): | ||||
# Don't send a verack in response | # Don't send a verack in response | ||||
pass | pass | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |