Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
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
vicotor
mybee
Commits
38725252
Unverified
Commit
38725252
authored
Nov 19, 2020
by
Janoš Guljaš
Committed by
GitHub
Nov 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused arguments and options from node.NewBee (#981)
parent
15e1b509
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
start.go
cmd/bee/cmd/start.go
+1
-6
node.go
pkg/node/node.go
+1
-3
No files found.
cmd/bee/cmd/start.go
View file @
38725252
...
...
@@ -99,10 +99,9 @@ Welcome to the Swarm.... Bzzz Bzzzz Bzzzz
return
err
}
b
,
err
:=
node
.
NewBee
(
c
.
config
.
GetString
(
optionNameP2PAddr
),
signerConfig
.
address
,
*
signerConfig
.
publicKey
,
signerConfig
.
keystore
,
signerConfig
.
signer
,
c
.
config
.
GetUint64
(
optionNameNetworkID
),
logger
,
signerConfig
.
libp2pPrivateKey
,
signerConfig
.
pssPrivateKey
,
node
.
Options
{
b
,
err
:=
node
.
NewBee
(
c
.
config
.
GetString
(
optionNameP2PAddr
),
signerConfig
.
address
,
*
signerConfig
.
publicKey
,
signerConfig
.
signer
,
c
.
config
.
GetUint64
(
optionNameNetworkID
),
logger
,
signerConfig
.
libp2pPrivateKey
,
signerConfig
.
pssPrivateKey
,
node
.
Options
{
DataDir
:
c
.
config
.
GetString
(
optionNameDataDir
),
DBCapacity
:
c
.
config
.
GetUint64
(
optionNameDBCapacity
),
Password
:
signerConfig
.
password
,
APIAddr
:
c
.
config
.
GetString
(
optionNameAPIAddr
),
DebugAPIAddr
:
debugAPIAddr
,
Addr
:
c
.
config
.
GetString
(
optionNameP2PAddr
),
...
...
@@ -177,13 +176,11 @@ Welcome to the Swarm.... Bzzz Bzzzz Bzzzz
}
type
signerConfig
struct
{
keystore
keystore
.
Service
signer
crypto
.
Signer
address
swarm
.
Address
publicKey
*
ecdsa
.
PublicKey
libp2pPrivateKey
*
ecdsa
.
PrivateKey
pssPrivateKey
*
ecdsa
.
PrivateKey
password
string
}
func
(
c
*
command
)
configureSigner
(
cmd
*
cobra
.
Command
,
logger
logging
.
Logger
)
(
config
*
signerConfig
,
err
error
)
{
...
...
@@ -314,12 +311,10 @@ func (c *command) configureSigner(cmd *cobra.Command, logger logging.Logger) (co
logger
.
Infof
(
"using ethereum address %x"
,
overlayEthAddress
)
return
&
signerConfig
{
keystore
:
keystore
,
signer
:
signer
,
address
:
address
,
publicKey
:
publicKey
,
libp2pPrivateKey
:
libp2pPrivateKey
,
pssPrivateKey
:
pssPrivateKey
,
password
:
password
,
},
nil
}
pkg/node/node.go
View file @
38725252
...
...
@@ -26,7 +26,6 @@ import (
"github.com/ethersphere/bee/pkg/debugapi"
"github.com/ethersphere/bee/pkg/hive"
"github.com/ethersphere/bee/pkg/kademlia"
"github.com/ethersphere/bee/pkg/keystore"
"github.com/ethersphere/bee/pkg/localstore"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/metrics"
...
...
@@ -85,7 +84,6 @@ type Bee struct {
type
Options
struct
{
DataDir
string
DBCapacity
uint64
Password
string
APIAddr
string
DebugAPIAddr
string
Addr
string
...
...
@@ -112,7 +110,7 @@ type Options struct {
SwapEnable
bool
}
func
NewBee
(
addr
string
,
swarmAddress
swarm
.
Address
,
publicKey
ecdsa
.
PublicKey
,
keystore
keystore
.
Service
,
signer
crypto
.
Signer
,
networkID
uint64
,
logger
logging
.
Logger
,
libp2pPrivateKey
,
pssPrivateKey
*
ecdsa
.
PrivateKey
,
o
Options
)
(
*
Bee
,
error
)
{
func
NewBee
(
addr
string
,
swarmAddress
swarm
.
Address
,
publicKey
ecdsa
.
PublicKey
,
signer
crypto
.
Signer
,
networkID
uint64
,
logger
logging
.
Logger
,
libp2pPrivateKey
,
pssPrivateKey
*
ecdsa
.
PrivateKey
,
o
Options
)
(
*
Bee
,
error
)
{
tracer
,
tracerCloser
,
err
:=
tracing
.
NewTracer
(
&
tracing
.
Options
{
Enabled
:
o
.
TracingEnabled
,
Endpoint
:
o
.
TracingEndpoint
,
...
...
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