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

[feat] Add Key Command #101

Merged
merged 12 commits into from
Nov 29, 2024
Merged

[feat] Add Key Command #101

merged 12 commits into from
Nov 29, 2024

Conversation

warittornc
Copy link
Member

Implementation details

  • Do 1
  • Do 2

Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request is linked to an issue with appropriate discussion and an accepted design OR is linked to a spec that describes the work.
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the GitHub PR explorer)

.with_context(|| "Failed to create monitoring key file")?;

file.write(signer.to_hex().as_bytes())
.with_context(|| "Failed to write monitoring key file")?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make file creation and writing atomic, now if there is writing error, user will get empty file?

Copy link
Contributor

Choose a reason for hiding this comment

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

If it's hard, can ignore

Copy link
Member Author

Choose a reason for hiding this comment

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

switched to user input

Copy link
Contributor

Choose a reason for hiding this comment

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

still see the file creation and writing na

Copy link
Member Author

Choose a reason for hiding this comment

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

resolved

bothan-api/server-cli/src/commands/key.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@colmazia colmazia left a comment

Choose a reason for hiding this comment

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

apart from this comment, everything else is ok

.with_context(|| "Failed to create monitoring key file")?;

file.write(signer.to_hex().as_bytes())
.with_context(|| "Failed to write monitoring key file")?;
Copy link
Contributor

Choose a reason for hiding this comment

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

still see the file creation and writing na

@warittornc warittornc merged commit 83dd29d into main Nov 29, 2024
3 checks passed
@warittornc warittornc deleted the add-key-cli branch November 29, 2024 11:02
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