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:
Simon
2018-02-21 19:59:10 -08:00
committed by Jack Grigg
parent c2d98b47c1
commit e6cd2a8356
3 changed files with 43 additions and 24 deletions

View File

@@ -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
}