Skip to content
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 read tip tool bug #3662

Merged
merged 4 commits into from
Nov 2, 2022
Merged

fix read tip tool bug #3662

merged 4 commits into from
Nov 2, 2022

Conversation

CoderZhi
Copy link
Collaborator

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@CoderZhi CoderZhi requested a review from a team as a code owner October 13, 2022 03:22
@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #3662 (18a9b79) into master (263ff82) will increase coverage by 0.06%.
The diff coverage is 90.69%.

❗ Current head 18a9b79 differs from pull request most recent head b124d26. Consider uploading reports for the commit b124d26 to get more accurate results

@@            Coverage Diff             @@
##           master    #3662      +/-   ##
==========================================
+ Coverage   74.47%   74.53%   +0.06%     
==========================================
  Files         269      274       +5     
  Lines       23925    24048     +123     
==========================================
+ Hits        17818    17925     +107     
- Misses       5174     5184      +10     
- Partials      933      939       +6     
Impacted Files Coverage Δ
action/protocol/staking/handlers.go 74.47% <33.33%> (-0.64%) ⬇️
ioctl/newcmd/did/didgenerate.go 83.67% <83.67%> (ø)
ioctl/newcmd/action/actionread.go 100.00% <100.00%> (ø)
ioctl/newcmd/action/actionsendraw.go 100.00% <100.00%> (ø)
ioctl/newcmd/did/diddoc.go 100.00% <100.00%> (ø)
ioctl/newcmd/did/didregister.go 100.00% <100.00%> (ø)
ioctl/newcmd/did/didupdate.go 100.00% <100.00%> (ø)
action/protocol/staking/candidate_center_extra.go 0.00% <0.00%> (-13.56%) ⬇️
action/protocol/staking/protocol.go 59.62% <0.00%> (+0.63%) ⬆️
ioctl/newcmd/action/action.go 90.04% <0.00%> (+0.95%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

func readStateDBPath() string {
if _stateDBPath != "" {
return _stateDBPath
}
cfg, err := config.New([]string{_overwritePath, _secretPath}, []string{})
Copy link
Member

@dustinxie dustinxie Oct 14, 2022

Choose a reason for hiding this comment

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

nit: instead of return statedb path, can return the cfg?

cfg, err := stateDBPathConfig()

then directly use it in main()

store, err := db.CreateKVStore(cfg.DB, cfg.Chain.TrieDBPath)

@CoderZhi CoderZhi mentioned this pull request Oct 18, 2022
1 task
@millken millken closed this Oct 19, 2022
@millken millken reopened this Oct 19, 2022
@sonarcloud
Copy link

sonarcloud bot commented Nov 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@millken millken merged commit 40e2325 into master Nov 2, 2022
@millken millken deleted the fix_start_stop_db branch November 2, 2022 05:10
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.

3 participants