Skip to content

Commit 99626b5

Browse files
committed
scenarios: remove unecessary import logic
1 parent 7bc5ba7 commit 99626b5

File tree

5 files changed

+6
-29
lines changed

5 files changed

+6
-29
lines changed

resources/scenarios/ln_init.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/usr/bin/env python3
22

33
from time import sleep
4-
5-
# The base class exists inside the commander container
6-
try:
7-
from commander import Commander
8-
except ImportError:
9-
from resources.scenarios.commander import Commander
4+
from commander import Commander
105

116

127
class LNInit(Commander):

resources/scenarios/miner_std.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/usr/bin/env python3
22

33
from time import sleep
4-
5-
# The base class exists inside the commander container
6-
try:
7-
from commander import Commander
8-
except ImportError:
9-
from resources.scenarios.commander import Commander
4+
from commander import Commander
105

116

127
class Miner:

resources/scenarios/reconnaissance.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
import socket
44

5-
# The base class exists inside the commander container when deployed,
6-
# but requires a relative path inside the python source code for other functions.
7-
try:
8-
from commander import Commander
9-
except ImportError:
10-
from resources.scenarios.commander import Commander
5+
from commander import Commander
116

127
# The entire Bitcoin Core test_framework directory is available as a library
138
from test_framework.messages import MSG_TX, CInv, hash256, msg_getdata

resources/scenarios/signet_miner.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
# we use the authproxy from the test framework.
1212
###
1313

14-
# The base class exists inside the commander container
15-
try:
16-
from commander import Commander
17-
except ImportError:
18-
from resources.scenarios.commander import Commander
14+
from commander import Commander
1915

2016
import json
2117
import logging

resources/scenarios/tx_flood.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env python3
2+
23
import threading
34
from random import choice, randrange
45
from time import sleep
5-
6-
# The base class exists inside the commander container
7-
try:
8-
from commander import Commander
9-
except ImportError:
10-
from resources.scenarios.commander import Commander
6+
from commander import Commander
117

128

139
class TXFlood(Commander):

0 commit comments

Comments
 (0)