File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
qa/rpc-tests/test_framework Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,22 @@ def initialize_datadir(dirname, n):
156
156
datadir = os .path .join (dirname , "node" + str (n ))
157
157
if not os .path .isdir (datadir ):
158
158
os .makedirs (datadir )
159
+ rpc_u , rpc_p = rpc_auth_pair (n )
159
160
with open (os .path .join (datadir , "bitcoin.conf" ), 'w' ) as f :
160
161
f .write ("regtest=1\n " )
161
- f .write ("rpcuser=rt \n " )
162
- f .write ("rpcpassword=rt \n " )
162
+ f .write ("rpcuser=" + rpc_u + " \n " )
163
+ f .write ("rpcpassword=" + rpc_p + " \n " )
163
164
f .write ("port=" + str (p2p_port (n ))+ "\n " )
164
165
f .write ("rpcport=" + str (rpc_port (n ))+ "\n " )
165
166
f .write ("listenonion=0\n " )
166
167
return datadir
167
168
169
+ def rpc_auth_pair (n ):
170
+ return 'rpcuser💻' + str (n ), 'rpcpass🔑' + str (n )
171
+
168
172
def rpc_url (i , rpchost = None ):
169
- return "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1' , rpc_port (i ))
173
+ rpc_u , rpc_p = rpc_auth_pair (i )
174
+ return "http://%s:%s@%s:%d" % (rpc_u , rpc_p , rpchost or '127.0.0.1' , rpc_port (i ))
170
175
171
176
def wait_for_bitcoind_start (process , url , i ):
172
177
'''
You can’t perform that action at this time.
0 commit comments