forked from IntersectMBO/cardano-node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement command-line handler for 'governance verify-poll'
As well as finalize the metadata extraction logic on the API's side. This is mostly the same thing as before, but it now takes a signed transaction file for verification instead of a standalone metadata. ``` ❯ cardano-cli governance verify-poll --poll-file polls/basic.json --tx-file verify/valid Found valid poll answer, signed by: [ "f8db28823f8ebd01a2d9e24efb2f0d18e387665770274513e370b5d5" ] ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/none Command failed: governance verify-poll Error: No answer found in the provided transaction's metadata. ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/malformed Command failed: governance verify-poll Error: Malformed metadata; couldn't deserialise answer: An error occured while decoding GovernancePollAnswer.2. Error: missing mandatory field ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/invalid Command failed: governance verify-poll Error: Invalid answer (42) not part of the poll. Accepted answers: 0 → yes 1 → no ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/mismatch Command failed: governance verify-poll Error: Answer's poll doesn't match provided poll (hash mismatch). ```
- Loading branch information
Showing
5 changed files
with
106 additions
and
72 deletions.
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
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