mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
network: Automatically set direct simplex mode per bid.
This commit is contained in:
@@ -106,8 +106,6 @@ class Test(TestSimplex2):
|
||||
logger.info("---------- Test multinet swap across networks")
|
||||
|
||||
swap_clients = self.swap_clients
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
swap_clients[2]._bridge_networks = True
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
@@ -163,8 +161,6 @@ class Test(TestSimplex2):
|
||||
logger.info("---------- Test reversed swap across networks")
|
||||
|
||||
swap_clients = self.swap_clients
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
swap_clients[2]._bridge_networks = True
|
||||
|
||||
coin_from = Coins.XMR
|
||||
@@ -214,9 +210,8 @@ class Test(TestSimplex2):
|
||||
logger.info("---------- Test secret hash swap across networks")
|
||||
|
||||
swap_clients = self.swap_clients
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
swap_clients[2]._bridge_networks = True
|
||||
|
||||
coin_from = Coins.PART
|
||||
coin_to = Coins.BTC
|
||||
self.prepare_balance(coin_to, 100.0, 1801, 1800)
|
||||
@@ -271,9 +266,6 @@ class Test(TestSimplex2):
|
||||
|
||||
# Messages for bids should only be sent to one network
|
||||
swap_clients = self.swap_clients
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
swap_clients[2]._bridge_networks = True
|
||||
assert len(swap_clients[2].active_networks) == 2
|
||||
|
||||
|
||||
@@ -457,6 +457,7 @@ class TestSimplex2(BaseTest):
|
||||
|
||||
@classmethod
|
||||
def addCoinSettings(cls, settings, datadir, node_id):
|
||||
settings["smsg_plaintext_version"] = 2
|
||||
settings["networks"] = [
|
||||
{
|
||||
"type": "simplex",
|
||||
@@ -479,7 +480,6 @@ class Test(TestSimplex2):
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
sc._smsg_plaintext_version = 2
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
assert swap_clients[0].active_networks[0]["type"] == "simplex"
|
||||
@@ -538,7 +538,6 @@ class Test(TestSimplex2):
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
sc._smsg_plaintext_version = 2
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
assert swap_clients[0].active_networks[0]["type"] == "simplex"
|
||||
@@ -597,7 +596,6 @@ class Test(TestSimplex2):
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = True
|
||||
sc._smsg_plaintext_version = 2
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
assert swap_clients[0].active_networks[0]["type"] == "simplex"
|
||||
@@ -672,7 +670,6 @@ class Test(TestSimplex2):
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = True
|
||||
sc._smsg_plaintext_version = 2
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
assert swap_clients[0].active_networks[0]["type"] == "simplex"
|
||||
@@ -745,7 +742,6 @@ class Test(TestSimplex2):
|
||||
|
||||
for sc in swap_clients:
|
||||
sc._use_direct_message_routes = False
|
||||
sc._smsg_plaintext_version = 2
|
||||
|
||||
assert len(swap_clients[0].active_networks) == 1
|
||||
assert swap_clients[0].active_networks[0]["type"] == "simplex"
|
||||
|
||||
Reference in New Issue
Block a user