Skip to content

Replace Sapling support-related asserts with JSON errors#3536

Merged
zkbot merged 1 commit intozcash:masterfrom
bitcartel:3533_replace_assert_with_exception
Sep 22, 2018
Merged

Replace Sapling support-related asserts with JSON errors#3536
zkbot merged 1 commit intozcash:masterfrom
bitcartel:3533_replace_assert_with_exception

Conversation

@bitcartel
Copy link
Copy Markdown
Contributor

@bitcartel bitcartel commented Sep 21, 2018

This helps prevent users from triggering an assert if they pass in Sapling addresses to RPC calls which do not fully support Sapling yet: z_mergetoaddress, z_importviewingkey and z_exportviewingkey.

Part of #3533.

This helps prevent users from triggering an assert if they pass in
Sapling addresses to RPC calls: z_mergetoaddress, z_importviewingkey
and z_exportviewingkey.
@bitcartel bitcartel added usability A-rpc-interface Area: RPC interface NU1-sapling Network upgrade: Sapling-specific tasks labels Sep 21, 2018
@bitcartel bitcartel added this to the v2.0.1 milestone Sep 21, 2018
@bitcartel bitcartel self-assigned this Sep 21, 2018
@bitcartel bitcartel requested review from Eirik0 and str4d September 21, 2018 22:04
@bitcartel
Copy link
Copy Markdown
Contributor Author

I ran tests with testnet node. e.g.

./zcash-cli z_mergetoaddress '["ANY_TADDR"]' ztestsapling12pwgppm6eq4fr3ckgwkd23lr7djaqklph4m8wg6lskkzg6zlj3nsnsuek80t3dmtgzuc5d75vrc
error code: -5
error message:
Currently, only Sprout zaddrs are supported

and

./zcash-cli z_exportviewingkey ztestsapling12pwgppm6eq4fr3ckgwkd23lr7djaqklph4m8wg6lskkzg6zlj3nsnsuek80t3dmtgzuc5d75vrc
error code: -5
error message:
Currently, only Sprout zaddrs are supported

@str4d str4d changed the title For #3533. Replace asserts with JSON errors. Replace Sapling support asserts with JSON errors Sep 21, 2018
@str4d str4d changed the title Replace Sapling support asserts with JSON errors Replace Sapling support-related asserts with JSON errors Sep 21, 2018
Copy link
Copy Markdown
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK

@str4d
Copy link
Copy Markdown
Contributor

str4d commented Sep 21, 2018

@zkbot r+

@zkbot
Copy link
Copy Markdown
Contributor

zkbot commented Sep 21, 2018

📌 Commit f1cb49a has been approved by str4d

@zkbot
Copy link
Copy Markdown
Contributor

zkbot commented Sep 21, 2018

⌛ Testing commit f1cb49a with merge 09476a5...

zkbot added a commit that referenced this pull request Sep 21, 2018
…=str4d

Replace Sapling support-related asserts with JSON errors

This helps prevent users from triggering an assert if they pass in Sapling addresses to RPC calls which do not fully support Sapling yet: z_mergetoaddress, z_importviewingkey and z_exportviewingkey.

Part of #3533.
@zkbot
Copy link
Copy Markdown
Contributor

zkbot commented Sep 22, 2018

☀️ Test successful - pr-merge
Approved by: str4d
Pushing 09476a5 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rpc-interface Area: RPC interface NU1-sapling Network upgrade: Sapling-specific tasks usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants