[RPC] redirect sendmany to shieldedsendmany when recipient is shielded#2014
Merged
furszy merged 5 commits intoDec 3, 2020
Merged
Conversation
when at least one of the recipients is a shielded address
2274e7f to
8ecf222
Compare
furszy
previously approved these changes
Dec 2, 2020
furszy
left a comment
There was a problem hiding this comment.
nice add man, code review ACK 8ecf222 . Can get merged at any time.
Would be good to have some tests using the sendmany shielded flow in the future. I know that it's mostly tested by the ones using shieldedsendmany but.. one or two more tests cases to cover this new introduction wouldn't hurt.
Author
|
@furszy test added :) |
Fuzzbawls
reviewed
Dec 3, 2020
| "2. \"amounts\" (string, required) A json object with addresses and amounts\n" | ||
| " {\n" | ||
| " \"address\":amount (numeric) The pivx address (either transparent or shielded) is the key,\n" | ||
| " the numeric amount in PIV is the value\n" |
Author
There was a problem hiding this comment.
that's not contemplated in sendmany.
Collaborator
There was a problem hiding this comment.
it could be though, since we're recreating the request further down and passing it on. I'm ok with excluding it for now, was just checking if this was intentional.
Fuzzbawls
approved these changes
Dec 3, 2020
furszy
added a commit
that referenced
this pull request
Dec 14, 2020
…elded recipient 7dbd3bf Refactor: Decouple ShieldedSendManyTo from sendtoaddress/sendmany (random-zebra) 774c544 [Test] Add case for (shielded) sendtoaddress (random-zebra) 46fe147 [RPC] Redirect sendtoaddress to shieldedsendmany when shielded recipient (random-zebra) Pull request description: Same as we did with `sendmany` on #2014 . Keep old implementation for transparent recipients. Add test case in `sapling_wallet` functional test (also currently running live on https://faucet.pivx.link/). ACKs for top commit: Fuzzbawls: ACK 7dbd3bf furszy: utACK 7dbd3bf Tree-SHA512: b7613ecd4828e7d1229810a179854c1b14c5aefee5a85738092b4256e15a981d39501b3e583f7d9c9ff08407cbfd61b18cd984fb0f4d7727e609b5a5924bcfc1
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Instead of throwing an error, let's repack the json request and send it to
shieldedsendmany.This makes the integration of send-to-shield-address much easier for third-party services.
We keep the old implementation of
sendmanyfort->ttransactions, until the two flows are properly abstracted.Also fix a minor bug found in
sendmany(not properly considering thefIncludeDelegatedflag), and add capability to spend P2CS insideSaplingOperation.Note: the same thing proposed here, could be done with the RPC
sendtoaddress(future).