Skip to content

Commit

Permalink
core: fix some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi committed Apr 9, 2024
1 parent fcd799f commit 88efafc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ type CacheConfig struct {
StateHistory uint64 // Number of blocks from head whose state histories are reserved.
StateScheme string // Scheme used to store ethereum states and merkle tree nodes on top
PathSyncFlush bool // Whether sync flush the trienodebuffer of pathdb to disk.
JournalFile string // whether enable TrieJournal store in wal
JournalFile string // whether enable TrieJournal store in journal file

SnapshotNoBuild bool // Whether the background generation is allowed
SnapshotWait bool // Wait for snapshot construction on startup. TODO(karalabe): This is a dirty hack for testing, nuke it
Expand Down
6 changes: 4 additions & 2 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
rawdb.WriteDatabaseVersion(chainDb, core.BlockChainVersion)
}
}
var journalFile string
var path string
var (
journalFile string
path string
)
if config.JournalFileEnabled {
if stack.IsSeparatedDB() {
path = ChainData + "/state"
Expand Down
2 changes: 1 addition & 1 deletion eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type Config struct {
// consistent with persistent state.
StateScheme string `toml:",omitempty"` // State scheme used to store ethereum state and merkle trie nodes on top
PathSyncFlush bool `toml:",omitempty"` // State scheme used to store ethereum state and merkle trie nodes on top
JournalFileEnabled bool // Enable the in-memory trie node layers to store to wal file when shutdown
JournalFileEnabled bool // Enable the TrieJournal to store to journal file when shutdown

// RequiredBlocks is a set of block number -> hash mappings which must be in the
// canonical chain of all remote peers. Setting the option makes geth verify the
Expand Down
2 changes: 1 addition & 1 deletion triedb/pathdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type Config struct {
DirtyCacheSize int // Maximum memory allowance (in bytes) for caching dirty nodes
ReadOnly bool // Flag whether the database is opened in read only mode.
NoTries bool
JournalFile string // whether enable TrieJournal store in wal
JournalFile string // whether enable TrieJournal store in journal file
}

// sanitize checks the provided user configurations and changes anything that's
Expand Down

0 comments on commit 88efafc

Please sign in to comment.