-
Notifications
You must be signed in to change notification settings - Fork 725
[RPC] redirect sendmany to shieldedsendmany when recipient is shielded #2014
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
[RPC] redirect sendmany to shieldedsendmany when recipient is shielded #2014
Conversation
when at least one of the recipients is a shielded address
2274e7f to
8ecf222
Compare
furszy
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.
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.
|
@furszy test added :) |
furszy
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.
Nice, utACK daa5d7f . More than ready to get merged then :)
| "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" |
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.
no memo support?
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.
that's not contemplated in sendmany.
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.
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
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.
utACK daa5d7f
…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
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).