Closes #2964. z_sendmany once again makes v1 tx for taddr to taddr.
In accordance with the Zcash protocol spec.
This commit is contained in:
@@ -60,7 +60,6 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
|
||||
UniValue contextInfo) :
|
||||
tx_(contextualTx), fromaddress_(fromAddress), t_outputs_(tOutputs), z_outputs_(zOutputs), mindepth_(minDepth), fee_(fee), contextinfo_(contextInfo)
|
||||
{
|
||||
assert(contextualTx.nVersion >= 2); // transaction format version must support vjoinsplit
|
||||
assert(fee_ >= 0);
|
||||
|
||||
if (minDepth < 0) {
|
||||
|
||||
@@ -3533,9 +3533,9 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
||||
UniValue contextInfo = o;
|
||||
|
||||
// Contextual transaction we will build on
|
||||
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(
|
||||
Params().GetConsensus(), chainActive.Height() + 1);
|
||||
if (contextualTx.nVersion == 1) {
|
||||
CMutableTransaction contextualTx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), chainActive.Height() + 1);
|
||||
bool isShielded = !fromTaddr || zaddrRecipients.size() > 0;
|
||||
if (contextualTx.nVersion == 1 && isShielded) {
|
||||
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user