Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
3d067b0c
Unverified
Commit
3d067b0c
authored
Mar 15, 2019
by
Anton Evangelatov
Committed by
GitHub
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/swarm/swarm-smoke: do not fail if a node does not respond to rpc (#19280)
parent
f1809812
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
upload_and_sync.go
cmd/swarm/swarm-smoke/upload_and_sync.go
+12
-4
No files found.
cmd/swarm/swarm-smoke/upload_and_sync.go
View file @
3d067b0c
...
...
@@ -44,7 +44,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
errc
:=
make
(
chan
error
)
go
func
()
{
errc
<-
upl
ao
dAndSync
(
ctx
,
randomBytes
,
tuid
)
errc
<-
upl
oa
dAndSync
(
ctx
,
randomBytes
,
tuid
)
}()
select
{
...
...
@@ -65,6 +65,14 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
return
e
}
// trigger debug functionality on randomBytes even on successful runs
err
:=
trackChunks
(
randomBytes
[
:
])
if
err
!=
nil
{
log
.
Error
(
err
.
Error
())
}
return
nil
}
func
trackChunks
(
testData
[]
byte
)
error
{
...
...
@@ -87,14 +95,14 @@ func trackChunks(testData []byte) error {
rpcClient
,
err
:=
rpc
.
Dial
(
httpHost
)
if
err
!=
nil
{
log
.
Error
(
"Error dialing host"
,
"err"
,
err
)
return
err
continue
}
var
hasInfo
[]
api
.
HasInfo
err
=
rpcClient
.
Call
(
&
hasInfo
,
"bzz_has"
,
addrs
)
if
err
!=
nil
{
log
.
Error
(
"Error calling host"
,
"err"
,
err
)
return
err
continue
}
count
:=
0
...
...
@@ -134,7 +142,7 @@ func getAllRefs(testData []byte) (storage.AddressCollection, error) {
return
fileStore
.
GetAllReferences
(
ctx
,
reader
,
false
)
}
func
upl
ao
dAndSync
(
c
*
cli
.
Context
,
randomBytes
[]
byte
,
tuid
string
)
error
{
func
upl
oa
dAndSync
(
c
*
cli
.
Context
,
randomBytes
[]
byte
,
tuid
string
)
error
{
log
.
Info
(
"uploading to "
+
httpEndpoint
(
hosts
[
0
])
+
" and syncing"
,
"tuid"
,
tuid
,
"seed"
,
seed
)
t1
:=
time
.
Now
()
...
...
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