Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
283375c9
Commit
283375c9
authored
Nov 02, 2023
by
kafeikui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #8010
parent
c4d9b85e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
__init__.py
bedrock-devnet/devnet/__init__.py
+4
-2
No files found.
bedrock-devnet/devnet/__init__.py
View file @
283375c9
...
@@ -288,21 +288,23 @@ def debug_dumpBlock(url):
...
@@ -288,21 +288,23 @@ def debug_dumpBlock(url):
def
wait_for_rpc_server
(
url
):
def
wait_for_rpc_server
(
url
):
log
.
info
(
f
'Waiting for RPC server at {url}'
)
log
.
info
(
f
'Waiting for RPC server at {url}'
)
conn
=
http
.
client
.
HTTPConnection
(
url
)
headers
=
{
'Content-type'
:
'application/json'
}
headers
=
{
'Content-type'
:
'application/json'
}
body
=
'{"id":1, "jsonrpc":"2.0", "method": "eth_chainId", "params":[]}'
body
=
'{"id":1, "jsonrpc":"2.0", "method": "eth_chainId", "params":[]}'
while
True
:
while
True
:
try
:
try
:
conn
=
http
.
client
.
HTTPConnection
(
url
)
conn
.
request
(
'POST'
,
'/'
,
body
,
headers
)
conn
.
request
(
'POST'
,
'/'
,
body
,
headers
)
response
=
conn
.
getresponse
()
response
=
conn
.
getresponse
()
conn
.
close
()
if
response
.
status
<
300
:
if
response
.
status
<
300
:
log
.
info
(
f
'RPC server at {url} ready'
)
log
.
info
(
f
'RPC server at {url} ready'
)
return
return
except
Exception
as
e
:
except
Exception
as
e
:
log
.
info
(
f
'Waiting for RPC server at {url}'
)
log
.
info
(
f
'Waiting for RPC server at {url}'
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
finally
:
if
conn
:
conn
.
close
()
CommandPreset
=
namedtuple
(
'Command'
,
[
'name'
,
'args'
,
'cwd'
,
'timeout'
])
CommandPreset
=
namedtuple
(
'Command'
,
[
'name'
,
'args'
,
'cwd'
,
'timeout'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment