4
4
import subprocess
5
5
from typing import Mapping , Any
6
6
7
- from electrum .simple_config import SimpleConfig
8
-
9
7
10
8
class TestLightning (unittest .TestCase ):
11
9
agents : Mapping [str , Mapping [str , Any ]]
@@ -51,7 +49,7 @@ class TestLightningAB(TestLightning):
51
49
'alice' : {
52
50
},
53
51
'bob' : {
54
- SimpleConfig . LIGHTNING_LISTEN . key () : 'localhost:9735' ,
52
+ 'lightning_listen' : 'localhost:9735' ,
55
53
}
56
54
}
57
55
@@ -83,15 +81,15 @@ def test_breach_with_spent_htlc(self):
83
81
class TestLightningSwapserver (TestLightning ):
84
82
agents = {
85
83
'alice' : {
86
- SimpleConfig . LIGHTNING_USE_GOSSIP . key () : 'false' ,
87
- SimpleConfig . SWAPSERVER_URL . key () : 'http://localhost:5455' ,
88
- SimpleConfig . NOSTR_RELAYS . key () : "''" ,
84
+ 'use_gossip' : 'false' ,
85
+ 'swapserver_url' : 'http://localhost:5455' ,
86
+ 'nostr_relays' : "''" ,
89
87
},
90
88
'bob' : {
91
- SimpleConfig . LIGHTNING_LISTEN . key () : 'localhost:9735' ,
89
+ 'lightning_listen' : 'localhost:9735' ,
92
90
'enable_plugin_swapserver' : 'true' ,
93
- SimpleConfig . SWAPSERVER_PORT . key () : '5455' ,
94
- SimpleConfig . NOSTR_RELAYS . key () : "''" ,
91
+ 'swapserver_port' : '5455' ,
92
+ 'nostr_relays' : "''" ,
95
93
}
96
94
}
97
95
@@ -111,14 +109,14 @@ class TestLightningWatchtower(TestLightning):
111
109
'alice' : {
112
110
},
113
111
'bob' : {
114
- SimpleConfig . LIGHTNING_LISTEN . key () : 'localhost:9735' ,
115
- SimpleConfig . WATCHTOWER_CLIENT_URL . key () :
'http://wtuser:[email protected] :12345' ,
112
+ 'lightning_listen' : 'localhost:9735' ,
113
+ 'watchtower_url' :
'http://wtuser:[email protected] :12345' ,
116
114
},
117
115
'carol' : {
118
116
'enable_plugin_watchtower' : 'true' ,
119
- SimpleConfig . WATCHTOWER_SERVER_USER . key () : 'wtuser' ,
120
- SimpleConfig . WATCHTOWER_SERVER_PASSWORD . key () : 'wtpassword' ,
121
- SimpleConfig . WATCHTOWER_SERVER_PORT . key () : '12345' ,
117
+ 'watchtower_user' : 'wtuser' ,
118
+ 'watchtower_password' : 'wtpassword' ,
119
+ 'watchtower_port' : '12345' ,
122
120
}
123
121
}
124
122
@@ -129,12 +127,12 @@ def test_watchtower(self):
129
127
class TestLightningJIT (TestLightning ):
130
128
agents = {
131
129
'alice' : {
132
- SimpleConfig . ACCEPT_ZEROCONF_CHANNELS . key () : 'true' ,
130
+ 'accept_zeroconf_channels' : 'true' ,
133
131
},
134
132
'bob' : {
135
- SimpleConfig . LIGHTNING_LISTEN . key () : 'localhost:9735' ,
136
- SimpleConfig . EXPERIMENTAL_LN_FORWARD_PAYMENTS . key () : 'true' ,
137
- SimpleConfig . ACCEPT_ZEROCONF_CHANNELS . key () : 'true' ,
133
+ 'lightning_listen' : 'localhost:9735' ,
134
+ 'lightning_forward_payments' : 'true' ,
135
+ 'accept_zeroconf_channels' : 'true' ,
138
136
},
139
137
'carol' : {
140
138
}
@@ -147,16 +145,16 @@ def test_just_in_time(self):
147
145
class TestLightningJITTrampoline (TestLightningJIT ):
148
146
agents = {
149
147
'alice' : {
150
- SimpleConfig . LIGHTNING_USE_GOSSIP . key () : 'false' ,
151
- SimpleConfig . ACCEPT_ZEROCONF_CHANNELS . key () : 'true' ,
148
+ 'use_gossip' : 'false' ,
149
+ 'accept_zeroconf_channels' : 'true' ,
152
150
},
153
151
'bob' : {
154
- SimpleConfig . LIGHTNING_LISTEN . key () : 'localhost:9735' ,
155
- SimpleConfig . EXPERIMENTAL_LN_FORWARD_PAYMENTS . key () : 'true' ,
156
- SimpleConfig . EXPERIMENTAL_LN_FORWARD_TRAMPOLINE_PAYMENTS . key () : 'true' ,
157
- SimpleConfig . ACCEPT_ZEROCONF_CHANNELS . key () : 'true' ,
152
+ 'lightning_listen' : 'localhost:9735' ,
153
+ 'lightning_forward_payments' : 'true' ,
154
+ 'lightning_forward_trampoline_payments' : 'true' ,
155
+ 'accept_zeroconf_channels' : 'true' ,
158
156
},
159
157
'carol' : {
160
- SimpleConfig . LIGHTNING_USE_GOSSIP . key () : 'false' ,
158
+ 'use_gossip' : 'false' ,
161
159
}
162
160
}
0 commit comments