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
93fee3ce
Unverified
Commit
93fee3ce
authored
Jun 24, 2021
by
Anatolie Lupacescu
Committed by
GitHub
Jun 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: override block time for mainnet (#2193)
parent
70ae0d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
start.go
cmd/bee/cmd/start.go
+12
-1
No files found.
cmd/bee/cmd/start.go
View file @
93fee3ce
...
...
@@ -138,6 +138,9 @@ inability to use, or your interaction with other nodes or the software.`)
bootnodes
:=
c
.
config
.
GetStringSlice
(
optionNameBootnodes
)
bootnodes
=
parseBootnodes
(
logger
,
mainnet
,
networkID
,
bootnodes
)
blockTime
:=
c
.
config
.
GetUint64
(
optionNameBlockTime
)
blockTime
=
parseBlockTime
(
mainnet
,
blockTime
)
b
,
err
:=
node
.
NewBee
(
c
.
config
.
GetString
(
optionNameP2PAddr
),
signerConfig
.
publicKey
,
signerConfig
.
signer
,
networkID
,
logger
,
signerConfig
.
libp2pPrivateKey
,
signerConfig
.
pssPrivateKey
,
&
node
.
Options
{
DataDir
:
c
.
config
.
GetString
(
optionNameDataDir
),
CacheCapacity
:
c
.
config
.
GetUint64
(
optionNameCacheCapacity
),
...
...
@@ -176,7 +179,7 @@ inability to use, or your interaction with other nodes or the software.`)
BlockHash
:
c
.
config
.
GetString
(
optionNameBlockHash
),
PostageContractAddress
:
c
.
config
.
GetString
(
optionNamePostageContractAddress
),
PriceOracleAddress
:
c
.
config
.
GetString
(
optionNamePriceOracleAddress
),
BlockTime
:
c
.
config
.
GetUint64
(
optionNameBlockTime
)
,
BlockTime
:
blockTime
,
DeployGasPrice
:
c
.
config
.
GetString
(
optionNameSwapDeploymentGasPrice
),
WarmupTime
:
c
.
config
.
GetDuration
(
optionWarmUpTime
),
})
...
...
@@ -442,3 +445,11 @@ func parseBootnodes(log logging.Logger, main bool, networkID uint64, bootnodes [
return
bootnodes
}
func
parseBlockTime
(
main
bool
,
blockTime
uint64
)
uint64
{
if
main
{
return
uint64
(
5
*
time
.
Second
)
}
return
blockTime
}
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