Skip to content

replace tm-db for cometbft-db - #162

Merged
lasarojc merged 3 commits into
v0.37.xfrom
lasarojc/134/replace-tmdb
Jan 20, 2023
Merged

lasarojc merged 3 commits into
v0.37.xfrom
lasarojc/134/replace-tmdb

Conversation

@lasarojc

@lasarojc lasarojc commented Jan 19, 2023 •

Copy link
Copy Markdown
Contributor

Closes #134
Based on #135


PR checklist

  • Tests written/updated, or no tests needed
  • CHANGELOG_PENDING.md updated, or no changelog entry needed
  • Updated relevant documentation (docs/) and code comments, or no
    documentation updates needed

@lasarojc lasarojc self-assigned this Jan 19, 2023
@lasarojc lasarojc linked an issue Jan 19, 2023 that may be closed by this pull request
thisConfig := ResetConfig(fmt.Sprintf("%s_%d", testName, i))
defer os.RemoveAll(thisConfig.RootDir)
ensureDir(path.Dir(thisConfig.Consensus.WalFile()), 0700) // dir for wal
ensureDir(path.Dir(thisConfig.Consensus.WalFile()), 0o700) // dir for wal

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this extra 0 added here?

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.

This is gofmt's doing. It changes octal numbers to follow the new standard, prefixing with 0o instead of just 0.

Ref: golang/go#33363

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you think it will break something with regards to data serialization or its just permissions on the file?

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.

I don't think it will break anything as it only changes the syntax but the compiled value remains the same.

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.

Comment thread consensus/common_test.go
func loadPrivValidator(config *cfg.Config) *privval.FilePV {
privValidatorKeyFile := config.PrivValidatorKeyFile()
ensureDir(filepath.Dir(privValidatorKeyFile), 0700)
ensureDir(filepath.Dir(privValidatorKeyFile), 0o700)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here, extra character added.

@lasarojc
lasarojc marked this pull request as ready for review January 20, 2023 10:29
@lasarojc
lasarojc requested a review from a team as a code owner January 20, 2023 10:29
@lasarojc
lasarojc merged commit 139b597 into v0.37.x Jan 20, 2023
@lasarojc
lasarojc deleted the lasarojc/134/replace-tmdb branch January 20, 2023 10:51
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.

v0.37.x: Replace tm-db with CometBFT DB

2 participants