Skip to content

Commit d6ed2f6

Browse files
jsvisakaralabe
authored andcommitted
eth, node, trie: fix minor typos (#16802)
1 parent 54294b4 commit d6ed2f6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

eth/backend.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
215215
return clique.New(chainConfig.Clique, db)
216216
}
217217
// Otherwise assume proof-of-work
218-
switch {
219-
case config.PowMode == ethash.ModeFake:
218+
switch config.PowMode {
219+
case ethash.ModeFake:
220220
log.Warn("Ethash used in fake mode")
221221
return ethash.NewFaker()
222-
case config.PowMode == ethash.ModeTest:
222+
case ethash.ModeTest:
223223
log.Warn("Ethash used in test mode")
224224
return ethash.NewTester()
225-
case config.PowMode == ethash.ModeShared:
225+
case ethash.ModeShared:
226226
log.Warn("Ethash used in shared mode")
227227
return ethash.NewShared()
228228
default:
@@ -239,7 +239,7 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chai
239239
}
240240
}
241241

242-
// APIs returns the collection of RPC services the ethereum package offers.
242+
// APIs return the collection of RPC services the ethereum package offers.
243243
// NOTE, some of these services probably need to be moved to somewhere else.
244244
func (s *Ethereum) APIs() []rpc.API {
245245
apis := ethapi.GetAPIs(s.APIBackend)

node/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ using the same data directory will store this information in different subdirect
5959
the data directory.
6060
6161
LevelDB databases are also stored within the instance subdirectory. If multiple node
62-
instances use the same data directory, openening the databases with identical names will
62+
instances use the same data directory, opening the databases with identical names will
6363
create one database for each instance.
6464
6565
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
8484
static-nodes.json -- devp2p static node list of instance B
8585
db/ -- LevelDB content for "db"
8686
db-2/ -- LevelDB content for "db-2"
87-
B.ipc -- JSON-RPC UNIX domain socket endpoint of instance A
87+
B.ipc -- JSON-RPC UNIX domain socket endpoint of instance B
8888
keystore/ -- account key store, used by both instances
8989
*/
9090
package node

trie/trie.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func New(root common.Hash, db *Database) (*Trie, error) {
101101
db: db,
102102
originalRoot: root,
103103
}
104-
if (root != common.Hash{}) && root != emptyRoot {
104+
if root != (common.Hash{}) && root != emptyRoot {
105105
rootnode, err := trie.resolveHash(root[:], nil)
106106
if err != nil {
107107
return nil, err

0 commit comments

Comments
 (0)