mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
097a8e7196
that's a result of: contrib/devtools/copyright_header.py update ./ it is not scripted diff, because it works differentlly on my localhost and in CI: CI doesn't want to use git commit date which is mocked to 30th Dec of 2023
32 lines
998 B
Python
Executable File
32 lines
998 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) 2021-2024 The Dash Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
"""Test being able to connect to the same devnet"""
|
|
|
|
from test_framework.p2p import P2PInterface
|
|
from test_framework.test_framework import BitcoinTestFramework
|
|
from test_framework.util import assert_equal
|
|
|
|
class ConnectDevnetNodes(BitcoinTestFramework):
|
|
def set_test_params(self):
|
|
self.setup_clean_chain = True
|
|
self.chain = "devnet"
|
|
self.num_nodes = 2
|
|
|
|
def setup_network(self):
|
|
self.add_nodes(self.num_nodes)
|
|
self.start_node(0)
|
|
self.start_node(1)
|
|
self.connect_nodes(0, 1)
|
|
self.sync_all()
|
|
|
|
|
|
def run_test(self):
|
|
self.nodes[0].add_p2p_connection(P2PInterface())
|
|
assert_equal(self.nodes[0].getconnectioncount(), 2) # 1 out dashd + 1 p2p
|
|
|
|
|
|
if __name__ == '__main__':
|
|
ConnectDevnetNodes().main()
|