-
Notifications
You must be signed in to change notification settings - Fork 231
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 #3760. #3768
Fix #3760. #3768
Conversation
cheatfate
commented
Jun 16, 2022
•
edited
Loading
edited
- Fix KeyManager API do not follows specification when importing keys. #3760
- Add test vectors for Keystore Management API keystore deserialization.
GJ. What a crazy serialization format, packing JSON into string into JSON 😅 |
@@ -336,6 +336,206 @@ proc runTests {.async.} = | |||
] | |||
) | |||
|
|||
suite "Serialization/deserialization " & preset(): |
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.
nice tests! These kinds of tests would be useful for all the rest-json serialized types
@@ -1908,44 +1909,82 @@ proc writeValue*(writer: var JsonWriter[RestJson], | |||
value: KeystoresAndSlashingProtection) {. | |||
raises: [IOError, Defect].} = | |||
writer.beginRecord() | |||
writer.writeField("keystores", value.keystores) | |||
let keystores = | |||
block: |
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.
You can simplify this with mapIt
.