diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index f73d515ea..63896bd7c 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -71,8 +71,6 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany( throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("runtime error: ") + e.what()); } } - - zcashParams_ = pzcashParams; // global } AsyncRPCOperation_sendmany::~AsyncRPCOperation_sendmany() { @@ -449,7 +447,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { // Decrypt the change note's ciphertext to retrieve some data we need ZCNoteDecryption decryptor(spendingkey_.viewing_key()); - auto hSig = prevJoinSplit.h_sig(*zcashParams_, tx_.joinSplitPubKey); + auto hSig = prevJoinSplit.h_sig(*pzcashParams, tx_.joinSplitPubKey); try { NotePlaintext plaintext = NotePlaintext::decrypt( decryptor, @@ -731,7 +729,7 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() { } // determine amount of funds in the note - auto hSig = wtx.vjoinsplit[i].h_sig(*zcashParams_, wtx.joinSplitPubKey); + auto hSig = wtx.vjoinsplit[i].h_sig(*pzcashParams, wtx.joinSplitPubKey); try { NotePlaintext plaintext = NotePlaintext::decrypt( decryptor, @@ -834,7 +832,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( ); // Generate the proof, this can take over a minute. - JSDescription jsdesc(*zcashParams_, + JSDescription jsdesc(*pzcashParams, joinSplitPubKey_, anchor, {info.vjsin[0], info.vjsin[1]}, @@ -885,7 +883,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( ss2 << ((unsigned char) 0x00); ss2 << jsdesc.ephemeralKey; ss2 << jsdesc.ciphertexts[0]; - ss2 << jsdesc.h_sig(*zcashParams_, joinSplitPubKey_); + ss2 << jsdesc.h_sig(*pzcashParams, joinSplitPubKey_); encryptedNote1 = HexStr(ss2.begin(), ss2.end()); } @@ -894,7 +892,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( ss2 << ((unsigned char) 0x01); ss2 << jsdesc.ephemeralKey; ss2 << jsdesc.ciphertexts[1]; - ss2 << jsdesc.h_sig(*zcashParams_, joinSplitPubKey_); + ss2 << jsdesc.h_sig(*pzcashParams, joinSplitPubKey_); encryptedNote2 = HexStr(ss2.begin(), ss2.end()); } diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index 28329f269..df10a2cee 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -69,7 +69,7 @@ private: uint256 joinSplitPubKey_; unsigned char joinSplitPrivKey_[crypto_sign_SECRETKEYBYTES]; - ZCJoinSplit *zcashParams_; + std::vector t_outputs_; std::vector z_outputs_;