Skip to content

fix: adapt journal for cmd#2425

Merged
zzzckck merged 2 commits intobnb-chain:developfrom
jingjunLi:fix-journal-cmd
Apr 28, 2024
Merged

fix: adapt journal for cmd#2425
zzzckck merged 2 commits intobnb-chain:developfrom
jingjunLi:fix-journal-cmd

Conversation

@jingjunLi
Copy link
Copy Markdown
Contributor

@jingjunLi jingjunLi commented Apr 26, 2024

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:

  • add each change in a bullet point here
  • ...

@jingjunLi jingjunLi requested a review from zzzckck as a code owner April 26, 2024 03:47
@jingjunLi jingjunLi requested review from fynnss and sysvm April 26, 2024 03:59
}

func PathDBConfigAddJournalFilePath(stack *node.Node, config *pathdb.Config) *pathdb.Config {
path := stack.ResolvePath("chaindata") + "/" + eth.JournalFileName
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

} else {
config.PathDB = pathdb.Defaults
}
config.PathDB.JournalFilePath = stack.ResolvePath("chaindata") + "/" + eth.JournalFileName
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor

@sysvm sysvm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@RenRick RenRick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zzzckck zzzckck merged commit 6573254 into bnb-chain:develop Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants