lockzins test finally passes because z_sendmany correctly locks notes now

This commit is contained in:
Duke
2025-08-21 16:59:33 -04:00
parent 8148c4f625
commit eb4fc52273
4 changed files with 91 additions and 23 deletions

View File

@@ -27,11 +27,9 @@
#include "transaction_builder.h"
#include "zcash/Address.hpp"
#include "wallet.h"
#include <array>
#include <unordered_map>
#include <tuple>
#include <univalue.h>
// Default transaction fee if caller does not specify one.
@@ -45,8 +43,8 @@ typedef std::tuple<std::string, CAmount, std::string> SendManyRecipient;
// Input UTXO is a tuple (quadruple) of txid, vout, amount, coinbase)
typedef std::tuple<uint256, int, CAmount, bool, CTxDestination> SendManyInputUTXO;
// Input note is a tuple of output, note, amount
typedef std::tuple<SaplingOutPoint, SaplingNote, CAmount> SendManyInputSaplingNote;
// Input note is a tuple of output, note, amount, spending key
typedef std::tuple<SaplingOutPoint, SaplingNote, CAmount, SaplingExpandedSpendingKey> SendManyInputSaplingNote;
class AsyncRPCOperation_sendmany : public AsyncRPCOperation {
public:
@@ -56,6 +54,7 @@ public:
std::string fromAddress,
std::vector<SendManyRecipient> tOutputs,
std::vector<SendManyRecipient> zOutputs,
std::vector<SendManyInputSaplingNote> saplingNoteInputs,
int minDepth,
CAmount fee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE,
UniValue contextInfo = NullUniValue,
@@ -95,7 +94,7 @@ private:
std::vector<SendManyRecipient> t_outputs_;
std::vector<SendManyRecipient> z_outputs_;
std::vector<SendManyInputUTXO> t_inputs_;
std::vector<SaplingNoteEntry> z_sapling_inputs_;
//std::vector<SaplingNoteEntry> z_sapling_inputs_;
std::vector<SendManyInputSaplingNote> saplingNoteInputs_;
TransactionBuilder builder_;