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
7c12e8ea
Commit
7c12e8ea
authored
Sep 15, 2016
by
Péter Szilágyi
Committed by
GitHub
Sep 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2999 from karalabe/bury-blockchain-version
cmd, eth: drop the blockchain version from cli/eth configs
parents
0f6f83a7
30860491
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
12 deletions
+3
-12
main.go
cmd/geth/main.go
+0
-1
usage.go
cmd/geth/usage.go
+0
-1
flags.go
cmd/utils/flags.go
+0
-6
backend.go
eth/backend.go
+3
-4
No files found.
cmd/geth/main.go
View file @
7c12e8ea
...
@@ -133,7 +133,6 @@ participating.
...
@@ -133,7 +133,6 @@ participating.
utils
.
BootnodesFlag
,
utils
.
BootnodesFlag
,
utils
.
DataDirFlag
,
utils
.
DataDirFlag
,
utils
.
KeyStoreDirFlag
,
utils
.
KeyStoreDirFlag
,
utils
.
BlockchainVersionFlag
,
utils
.
OlympicFlag
,
utils
.
OlympicFlag
,
utils
.
FastSyncFlag
,
utils
.
FastSyncFlag
,
utils
.
CacheFlag
,
utils
.
CacheFlag
,
...
...
cmd/geth/usage.go
View file @
7c12e8ea
...
@@ -74,7 +74,6 @@ var AppHelpFlagGroups = []flagGroup{
...
@@ -74,7 +74,6 @@ var AppHelpFlagGroups = []flagGroup{
utils
.
FastSyncFlag
,
utils
.
FastSyncFlag
,
utils
.
LightKDFFlag
,
utils
.
LightKDFFlag
,
utils
.
CacheFlag
,
utils
.
CacheFlag
,
utils
.
BlockchainVersionFlag
,
},
},
},
},
{
{
...
...
cmd/utils/flags.go
View file @
7c12e8ea
...
@@ -146,11 +146,6 @@ var (
...
@@ -146,11 +146,6 @@ var (
Usage
:
"Megabytes of memory allocated to internal caching (min 16MB / database forced)"
,
Usage
:
"Megabytes of memory allocated to internal caching (min 16MB / database forced)"
,
Value
:
128
,
Value
:
128
,
}
}
BlockchainVersionFlag
=
cli
.
IntFlag
{
Name
:
"blockchainversion"
,
Usage
:
"Blockchain version (integer)"
,
Value
:
core
.
BlockChainVersion
,
}
FastSyncFlag
=
cli
.
BoolFlag
{
FastSyncFlag
=
cli
.
BoolFlag
{
Name
:
"fast"
,
Name
:
"fast"
,
Usage
:
"Enable fast syncing through state downloads"
,
Usage
:
"Enable fast syncing through state downloads"
,
...
@@ -681,7 +676,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
...
@@ -681,7 +676,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
Etherbase
:
MakeEtherbase
(
stack
.
AccountManager
(),
ctx
),
Etherbase
:
MakeEtherbase
(
stack
.
AccountManager
(),
ctx
),
ChainConfig
:
MustMakeChainConfig
(
ctx
),
ChainConfig
:
MustMakeChainConfig
(
ctx
),
FastSync
:
ctx
.
GlobalBool
(
FastSyncFlag
.
Name
),
FastSync
:
ctx
.
GlobalBool
(
FastSyncFlag
.
Name
),
BlockChainVersion
:
ctx
.
GlobalInt
(
BlockchainVersionFlag
.
Name
),
DatabaseCache
:
ctx
.
GlobalInt
(
CacheFlag
.
Name
),
DatabaseCache
:
ctx
.
GlobalInt
(
CacheFlag
.
Name
),
DatabaseHandles
:
MakeDatabaseHandles
(),
DatabaseHandles
:
MakeDatabaseHandles
(),
NetworkId
:
ctx
.
GlobalInt
(
NetworkIdFlag
.
Name
),
NetworkId
:
ctx
.
GlobalInt
(
NetworkIdFlag
.
Name
),
...
...
eth/backend.go
View file @
7c12e8ea
...
@@ -70,7 +70,6 @@ type Config struct {
...
@@ -70,7 +70,6 @@ type Config struct {
Genesis
string
// Genesis JSON to seed the chain database with
Genesis
string
// Genesis JSON to seed the chain database with
FastSync
bool
// Enables the state download based fast synchronisation algorithm
FastSync
bool
// Enables the state download based fast synchronisation algorithm
BlockChainVersion
int
SkipBcVersionCheck
bool
// e.g. blockchain export
SkipBcVersionCheck
bool
// e.g. blockchain export
DatabaseCache
int
DatabaseCache
int
DatabaseHandles
int
DatabaseHandles
int
...
@@ -180,10 +179,10 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
...
@@ -180,10 +179,10 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
if
!
config
.
SkipBcVersionCheck
{
if
!
config
.
SkipBcVersionCheck
{
bcVersion
:=
core
.
GetBlockChainVersion
(
chainDb
)
bcVersion
:=
core
.
GetBlockChainVersion
(
chainDb
)
if
bcVersion
!=
co
nfig
.
BlockChainVersion
&&
bcVersion
!=
0
{
if
bcVersion
!=
co
re
.
BlockChainVersion
&&
bcVersion
!=
0
{
return
nil
,
fmt
.
Errorf
(
"Blockchain DB version mismatch (%d / %d). Run geth upgradedb.
\n
"
,
bcVersion
,
co
nfig
.
BlockChainVersion
)
return
nil
,
fmt
.
Errorf
(
"Blockchain DB version mismatch (%d / %d). Run geth upgradedb.
\n
"
,
bcVersion
,
co
re
.
BlockChainVersion
)
}
}
core
.
WriteBlockChainVersion
(
chainDb
,
co
nfig
.
BlockChainVersion
)
core
.
WriteBlockChainVersion
(
chainDb
,
co
re
.
BlockChainVersion
)
}
}
// load the genesis block or write a new one if no genesis
// load the genesis block or write a new one if no genesis
...
...
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