-
Notifications
You must be signed in to change notification settings - Fork 32
GH-598-json-hotfix #699
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
GH-598-json-hotfix #699
Conversation
| // Submission error | ||
| assert_eq!( | ||
| FailureReason::from_str(r#"{"Submission":{"Local":{"Decoder"}}}"#).unwrap(), | ||
| FailureReason::from_str(r#"{"Submission":"Decoder"}"#).unwrap(), |
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.
We should keep "Local" here, that's an important thing.
| } | ||
|
|
||
| let mut hash_map: HashMap<BlockchainErrorKind, ErrorStats> = hashmap!(); | ||
| loop { |
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.
Instead of this, you can do it like this:
while let Some(entry) = seq.next_element::<EntryOwned>()? {
hash_map.insert(entry.error_kind, entry.stats);
}
Ok(PreviousAttempts { inner: error_stats_map })|
|
||
| #[test] | ||
| fn previous_attempts_custom_deserialize_happy_path() { | ||
| let str = r#"[{"error":{"AppRpc":"Internal"},"firstSeen":{"secs_since_epoch":1234567890,"nanos_since_epoch":0},"attempts":1}]"#; |
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.
Here too, we're losing the precision here. We also want to know if it's remote or local.
|
|
||
| assert_eq!( | ||
| result.unwrap_err().to_string(), | ||
| "invalid type: string \"Yesterday\", expected struct SystemTime at line 1 column 69" |
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.
😂
utkarshg6
left a comment
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.
LGTM
utkarshg6
left a comment
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.
Thank you!
No description provided.