-
Notifications
You must be signed in to change notification settings - Fork 329
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
UX improvement in relayer #541
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cc589eb
Avoid unwraps in client txs. Better LightClient errors.
adizere d50522d
Avoided unwrap calls in tx raw commands
adizere 855b5fa
Tagged relayer RPC error with the culprit IP address.
adizere 6da84d6
Replaced start with v0
adizere 7534bd7
Introduced logging levels. WIP: remove status_ calls
adizere f7764a1
Updated the sample config file
adizere d761502
FMT fix
adizere e6730ef
Adapted keys commands to JSON output
adizere 1145edb
Transition to tracing macros & JSON outputs
adizere 5ffe823
Changelog
adizere d638cc3
Added operation instructions.
adizere fc67361
Simplified Output usage; h/t Romain's suggestions.
adizere fe5b437
Better err message for client consensus query
adizere File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
use crate::prelude::*; | ||
|
||
use abscissa_core::{Command, Options, Runnable}; | ||
|
||
use crate::conclude::Output; | ||
use crate::prelude::*; | ||
|
||
#[derive(Command, Debug, Options)] | ||
pub struct ValidateCmd {} | ||
|
||
impl Runnable for ValidateCmd { | ||
/// Validate the loaded configuration. | ||
fn run(&self) { | ||
let config = app_config(); | ||
status_ok!("Loaded configuration:", "{:#?}", *config); | ||
info!("Loaded configuration: {:?}", *config); | ||
|
||
// TODO: Validate configuration | ||
|
||
Output::with_success().exit(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could introduce a couple helpers to streamline such code a bit, eg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, what do you think about changing the type of
success
/error
/with_result
towhich would result into
Having to call
unwrap
on the result ofserde_json::to_value
is unfortunate, but that's actually what thejson!
macro does under the hood so perhaps it's okay?Also note that this would still allow passing a custom JSON object with the
json!
macro:Reason is that
json!
returns aValue
whoseSerialize
instance produces the sameValue
when given toto_value
.