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
d6ed2f67
Commit
d6ed2f67
authored
May 24, 2018
by
Wenbiao Zheng
Committed by
Péter Szilágyi
May 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth, node, trie: fix minor typos (#16802)
parent
54294b45
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
backend.go
eth/backend.go
+5
-5
doc.go
node/doc.go
+2
-2
trie.go
trie/trie.go
+1
-1
No files found.
eth/backend.go
View file @
d6ed2f67
...
@@ -215,14 +215,14 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
...
@@ -215,14 +215,14 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
return
clique
.
New
(
chainConfig
.
Clique
,
db
)
return
clique
.
New
(
chainConfig
.
Clique
,
db
)
}
}
// Otherwise assume proof-of-work
// Otherwise assume proof-of-work
switch
{
switch
config
.
PowMode
{
case
config
.
PowMode
==
ethash
.
ModeFake
:
case
ethash
.
ModeFake
:
log
.
Warn
(
"Ethash used in fake mode"
)
log
.
Warn
(
"Ethash used in fake mode"
)
return
ethash
.
NewFaker
()
return
ethash
.
NewFaker
()
case
config
.
PowMode
==
ethash
.
ModeTest
:
case
ethash
.
ModeTest
:
log
.
Warn
(
"Ethash used in test mode"
)
log
.
Warn
(
"Ethash used in test mode"
)
return
ethash
.
NewTester
()
return
ethash
.
NewTester
()
case
config
.
PowMode
==
ethash
.
ModeShared
:
case
ethash
.
ModeShared
:
log
.
Warn
(
"Ethash used in shared mode"
)
log
.
Warn
(
"Ethash used in shared mode"
)
return
ethash
.
NewShared
()
return
ethash
.
NewShared
()
default
:
default
:
...
@@ -239,7 +239,7 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
...
@@ -239,7 +239,7 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
}
}
}
}
// APIs return
s
the collection of RPC services the ethereum package offers.
// APIs return the collection of RPC services the ethereum package offers.
// NOTE, some of these services probably need to be moved to somewhere else.
// NOTE, some of these services probably need to be moved to somewhere else.
func
(
s
*
Ethereum
)
APIs
()
[]
rpc
.
API
{
func
(
s
*
Ethereum
)
APIs
()
[]
rpc
.
API
{
apis
:=
ethapi
.
GetAPIs
(
s
.
APIBackend
)
apis
:=
ethapi
.
GetAPIs
(
s
.
APIBackend
)
...
...
node/doc.go
View file @
d6ed2f67
...
@@ -59,7 +59,7 @@ using the same data directory will store this information in different subdirect
...
@@ -59,7 +59,7 @@ using the same data directory will store this information in different subdirect
the data directory.
the data directory.
LevelDB databases are also stored within the instance subdirectory. If multiple node
LevelDB databases are also stored within the instance subdirectory. If multiple node
instances use the same data directory, open
en
ing the databases with identical names will
instances use the same data directory, opening the databases with identical names will
create one database for each instance.
create one database for each instance.
The account key store is shared among all node instances using the same data directory
The account key store is shared among all node instances using the same data directory
...
@@ -84,7 +84,7 @@ directory. Mode instance A opens the database "db", node instance B opens the da
...
@@ -84,7 +84,7 @@ directory. Mode instance A opens the database "db", node instance B opens the da
static-nodes.json -- devp2p static node list of instance B
static-nodes.json -- devp2p static node list of instance B
db/ -- LevelDB content for "db"
db/ -- LevelDB content for "db"
db-2/ -- LevelDB content for "db-2"
db-2/ -- LevelDB content for "db-2"
B.ipc -- JSON-RPC UNIX domain socket endpoint of instance
A
B.ipc -- JSON-RPC UNIX domain socket endpoint of instance
B
keystore/ -- account key store, used by both instances
keystore/ -- account key store, used by both instances
*/
*/
package
node
package
node
trie/trie.go
View file @
d6ed2f67
...
@@ -101,7 +101,7 @@ func New(root common.Hash, db *Database) (*Trie, error) {
...
@@ -101,7 +101,7 @@ func New(root common.Hash, db *Database) (*Trie, error) {
db
:
db
,
db
:
db
,
originalRoot
:
root
,
originalRoot
:
root
,
}
}
if
(
root
!=
common
.
Hash
{})
&&
root
!=
emptyRoot
{
if
root
!=
(
common
.
Hash
{})
&&
root
!=
emptyRoot
{
rootnode
,
err
:=
trie
.
resolveHash
(
root
[
:
],
nil
)
rootnode
,
err
:=
trie
.
resolveHash
(
root
[
:
],
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
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