Commit Graph

11 Commits

Author SHA1 Message Date
Greg Pfeil 4d1e37da23
Support UA destinations in `z_mergetoaddress` 2023-04-24 18:11:26 -06:00
Greg Pfeil dc6260ba3e
Allow explicit “no memo” in z_mergetoaddress
Previously, there were no arguments after `memo`, so it could always just be
omitted. Now the `privacyPolicy` is there, so it’s necessary to be able to
explicitly omit the memo.

Using `"F6"` would work in some situations, but while it encodes the “no memo”
case, the internal checks that ensure we don’t try to send a memo to transparent
recipients fail on it. And as we can’t merge to a taddr without specifying
`"AllowRevealedRecipients"`, this prevents merging to taddrs (unless the
deprecated `legacy_privacy` feature is enabled).

This change makes it possible to send `null` as the `memo` argument, which
indicates “no memo” successfully. It does the same for `*_limit` parameters in
`z_mergetoaddress` and `z_shieldcoinbase` (even though those don’t have a
similar failure case), since those parameters also need to be specified when the
`privacyPolicy` is, and it’s consistent with #6599, rather than hardcoding some
particular value.

This also fixes a bug in `WalletTxBuilder` that could inadvertently require
`AllowRevealedAmounts` on a transaction from a shielded pool to itself (via
`NetAmountRecipient`).
2023-04-24 16:11:53 -06:00
Greg Pfeil 94f5bfc595
Update z_mergetoaddress to use WalletTxBuilder
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Co-authored-by: Jack Grigg <jack@z.cash>
2023-04-19 22:26:42 -06:00
Daira Emma Hopwood eb74c8e8b0 Repair some RPC tests.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Kris Nuttycombe fefea8fe29 Fix RPC tests that depend upon -anchorconfirmations=1 2022-05-04 18:00:34 -06:00
mdr0id 65a02f0984 Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
Jack Grigg 8669cb692d
test: Update RPC tests to use a minimum of Sapling
The p2p_nu_peer_management and rewind_index RPC tests still start from
Sprout, because they are explicitly (and only) testing network behaviour
across network upgrades.

The mempool_tx_input_limit test is removed because the flag has been
ignored since Sapling activation, and will be removed at some point in
the near future.
2019-08-22 17:26:54 +01:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
mdr0id 4ca5def62f Make pythonisms consistent 2018-12-18 12:16:23 -08:00
Eirik Ogilvie-Wigley 487c9020bd Add Sapling support to z_mergetoaddress 2018-11-16 18:14:58 -07:00
Eirik Ogilvie-Wigley e0c491c073 Extend Sprout mergetoaddress rpc test to also work for Sapling 2018-11-16 18:14:57 -07:00