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
3e1cfbae
Commit
3e1cfbae
authored
Oct 29, 2018
by
Roc Yu
Committed by
Anton Evangelatov
Oct 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/swarm/swarm-smoke: fix issue that loop variable capture in func (#17992)
parent
54f650a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
feed_upload_and_sync.go
cmd/swarm/swarm-smoke/feed_upload_and_sync.go
+5
-8
No files found.
cmd/swarm/swarm-smoke/feed_upload_and_sync.go
View file @
3e1cfbae
...
@@ -13,16 +13,13 @@ import (
...
@@ -13,16 +13,13 @@ import (
"sync"
"sync"
"time"
"time"
"github.com/pborman/uuid"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/swarm/multihash"
"github.com/ethereum/go-ethereum/swarm/multihash"
"github.com/ethereum/go-ethereum/swarm/storage/feed"
"github.com/ethereum/go-ethereum/swarm/storage/feed"
colorable
"github.com/mattn/go-colorable"
colorable
"github.com/mattn/go-colorable"
"github.com/pborman/uuid"
cli
"gopkg.in/urfave/cli.v1"
cli
"gopkg.in/urfave/cli.v1"
)
)
...
@@ -190,7 +187,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
...
@@ -190,7 +187,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
for
_
,
hex
:=
range
[]
string
{
topicHex
,
subTopicOnlyHex
,
mergedSubTopicHex
}
{
for
_
,
hex
:=
range
[]
string
{
topicHex
,
subTopicOnlyHex
,
mergedSubTopicHex
}
{
wg
.
Add
(
1
)
wg
.
Add
(
1
)
ruid
:=
uuid
.
New
()[
:
8
]
ruid
:=
uuid
.
New
()[
:
8
]
go
func
(
endpoint
string
,
ruid
string
)
{
go
func
(
hex
string
,
endpoint
string
,
ruid
string
)
{
for
{
for
{
err
:=
fetchFeed
(
hex
,
userHex
,
endpoint
,
dataHash
,
ruid
)
err
:=
fetchFeed
(
hex
,
userHex
,
endpoint
,
dataHash
,
ruid
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -200,7 +197,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
...
@@ -200,7 +197,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
wg
.
Done
()
wg
.
Done
()
return
return
}
}
}(
endpoint
,
ruid
)
}(
hex
,
endpoint
,
ruid
)
}
}
}
}
...
@@ -268,7 +265,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
...
@@ -268,7 +265,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
for
_
,
url
:=
range
[]
string
{
manifestWithTopic
,
manifestWithSubTopic
,
manifestWithMergedTopic
}
{
for
_
,
url
:=
range
[]
string
{
manifestWithTopic
,
manifestWithSubTopic
,
manifestWithMergedTopic
}
{
wg
.
Add
(
1
)
wg
.
Add
(
1
)
ruid
:=
uuid
.
New
()[
:
8
]
ruid
:=
uuid
.
New
()[
:
8
]
go
func
(
endpoint
string
,
ruid
string
)
{
go
func
(
url
string
,
endpoint
string
,
ruid
string
)
{
for
{
for
{
err
:=
fetch
(
url
,
endpoint
,
fileHash
,
ruid
)
err
:=
fetch
(
url
,
endpoint
,
fileHash
,
ruid
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -278,7 +275,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
...
@@ -278,7 +275,7 @@ func cliFeedUploadAndSync(c *cli.Context) error {
wg
.
Done
()
wg
.
Done
()
return
return
}
}
}(
endpoint
,
ruid
)
}(
url
,
endpoint
,
ruid
)
}
}
}
}
...
...
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