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 @@ -150,17 +150,22 @@ def initialize_datadir(dirname, n):
150
150
datadir = os .path .join (dirname , "node" + str (n ))
151
151
if not os .path .isdir (datadir ):
152
152
os .makedirs (datadir )
153
+ rpc_u , rpc_p = rpc_auth_pair (n )
153
154
with open (os .path .join (datadir , "bitcoin.conf" ), 'w' ) as f :
154
155
f .write ("regtest=1\n " )
155
- f .write ("rpcuser=rt \n " )
156
- f .write ("rpcpassword=rt \n " )
156
+ f .write ("rpcuser=" + rpc_u + " \n " )
157
+ f .write ("rpcpassword=" + rpc_p + " \n " )
157
158
f .write ("port=" + str (p2p_port (n ))+ "\n " )
158
159
f .write ("rpcport=" + str (rpc_port (n ))+ "\n " )
159
160
f .write ("listenonion=0\n " )
160
161
return datadir
161
162
163
+ def rpc_auth_pair (n ):
164
+ return 'rpcuser💻' + str (n ), 'rpcpass🔑' + str (n )
165
+
162
166
def rpc_url (i , rpchost = None ):
163
- return "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1' , rpc_port (i ))
167
+ rpc_u , rpc_p = rpc_auth_pair (i )
168
+ return "http://%s:%s@%s:%d" % (rpc_u , rpc_p , rpchost or '127.0.0.1' , rpc_port (i ))
164
169
165
170
def wait_for_bitcoind_start (process , url , i ):
166
171
'''
You can’t perform that action at this time.
0 commit comments