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(reset-data): the argument --network-peer-store couldn't work #2950

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Aug 16, 2021

What problem does this PR solve?

  • The argument --network-peer-store for the sub-command reset-data couldn't work.

    Because the path of network/peer-store is a directory but using a method which removes files to delete it.

  • Return code is 0 when has errors.

  • Prompt to remove a empty path.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

    • ckb init --chain dev -C dev

    • Check 1:

      • ckb reset-data -C dev: returns 0 immediately without prompt.
    • ckb run -C dev and Ctrl-C after 10 seconds.

    • Check 2:

      • ls dev/data/network/peer_store: the directory should exists.

      • ckb reset-data -C dev --force --network-peer-store: returns 0 immediately without prompt.

      • ls dev/data/network/peer_store: the directory should be removed.

    • rm dev/data/network/secret_key

    • mkdir dev/data/network/secret_key

    • Check 3:

      • ckb reset-data -C dev --force --network-secret-key: returns >0 immediately without prompt.

Release note

Title Only: Include only the PR title in the release note.

@doitian
Copy link
Member

doitian commented Aug 16, 2021

This PR requires the test check list section in the PR template:

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test
- Manual test (add detailed scripts or steps below)
- No code (skip ci)

@yangby-cryptape
Copy link
Collaborator Author

This PR requires the test check list section in the PR template:

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test
- Manual test (add detailed scripts or steps below)
- No code (skip ci)

DONE!

@yangby-cryptape yangby-cryptape marked this pull request as ready for review August 16, 2021 07:39
@yangby-cryptape yangby-cryptape requested a review from a team as a code owner August 16, 2021 07:39
@doitian
Copy link
Member

doitian commented Aug 16, 2021

@zhangsoledad @liya2017 please review

@yangby-cryptape
Copy link
Collaborator Author

bors merge=doitian,driftluo

@bors
Copy link
Contributor

bors bot commented Aug 17, 2021

Build succeeded:

@bors bors bot merged commit c3459b5 into nervosnetwork:develop Aug 17, 2021
@doitian doitian mentioned this pull request Aug 23, 2021
3 tasks
@yangby-cryptape yangby-cryptape deleted the pr/fix-reset-data branch August 27, 2021 03:00
@doitian doitian mentioned this pull request Sep 3, 2021
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