-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: adapt journal for cmd #2425
Conversation
cmd/utils/flags.go
Outdated
@@ -2430,6 +2430,12 @@ func MakeBlockDatabase(ctx *cli.Context, stack *node.Node, readonly, disableFree | |||
return blockDb | |||
} | |||
|
|||
func PathDBConfigAddJournalFilePath(stack *node.Node, config *pathdb.Config) *pathdb.Config { | |||
path := stack.ResolvePath("chaindata") + "/" + eth.JournalFileName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use fmt.Sprintf()
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
cmd/utils/flags.go
Outdated
@@ -2593,6 +2599,7 @@ func MakeTrieDatabase(ctx *cli.Context, disk ethdb.Database, preimage bool, read | |||
} else { | |||
config.PathDB = pathdb.Defaults | |||
} | |||
config.PathDB.JournalFilePath = stack.ResolvePath("chaindata") + "/" + eth.JournalFileName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
A new JournalFilePath configuration has been added to triedb.Config, fix some code to adapt this config to cmd;
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: