Remove unused code and formatting

This commit is contained in:
Duke
2025-05-30 08:22:16 -04:00
parent d7fe1d43ca
commit b43a4f2653
2 changed files with 8 additions and 46 deletions

View File

@@ -53,13 +53,13 @@ using namespace libzcash;
extern UniValue sendrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk);
AsyncRPCOperation_mergetoaddress::AsyncRPCOperation_mergetoaddress(
boost::optional<TransactionBuilder> builder,
CMutableTransaction contextualTx,
std::vector<MergeToAddressInputUTXO> utxoInputs,
std::vector<MergeToAddressInputSaplingNote> saplingNoteInputs,
MergeToAddressRecipient recipient,
CAmount fee,
UniValue contextInfo) :
boost::optional<TransactionBuilder> builder,
CMutableTransaction contextualTx,
std::vector<MergeToAddressInputUTXO> utxoInputs,
std::vector<MergeToAddressInputSaplingNote> saplingNoteInputs,
MergeToAddressRecipient recipient,
CAmount fee,
UniValue contextInfo) :
tx_(contextualTx), utxoInputs_(utxoInputs), saplingNoteInputs_(saplingNoteInputs), recipient_(recipient), fee_(fee), contextinfo_(contextInfo)
{
if (fee < 0 || fee > MAX_MONEY) {
@@ -192,22 +192,6 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
size_t numInputs = utxoInputs_.size();
/*
// Check mempooltxinputlimit to avoid creating a transaction which the local mempool rejects
size_t limit = (size_t)GetArg("-mempooltxinputlimit", 0);
{
LOCK(cs_main);
if (NetworkUpgradeActive(chainActive.Height() + 1, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
limit = 0;
}
}
if (limit > 0 && numInputs > limit) {
throw JSONRPCError(RPC_WALLET_ERROR,
strprintf("Number of transparent inputs %d is greater than mempooltxinputlimit of %d",
numInputs, limit));
}
*/
CAmount t_inputs_total = 0;
for (MergeToAddressInputUTXO& t : utxoInputs_) {
t_inputs_total += std::get<1>(t);

View File

@@ -205,12 +205,6 @@ bool AsyncRPCOperation_sendmany::main_impl() {
assert(isfromtaddr_ != isfromzaddr_);
/* TODO: this needs to allow DPoW addresses. Consensus-time checks do it correctly.
if(t_outputs_.size() > 0) {
throw JSONRPCError(RPC_WALLET_ERROR, "Extreme Privacy! You cannot send to a transparent address.");
}
*/
bool isSingleZaddrOutput = (t_outputs_.size()==0 && z_outputs_.size()==1);
bool isMultipleZaddrOutput = (t_outputs_.size()==0 && z_outputs_.size()>=1);
bool isPureTaddrOnlyTx = (isfromtaddr_ && z_outputs_.size() == 0);
@@ -319,23 +313,6 @@ bool AsyncRPCOperation_sendmany::main_impl() {
t_inputs_ = selectedTInputs;
t_inputs_total = selectedUTXOAmount;
/*
// Check mempooltxinputlimit to avoid creating a transaction which the local mempool rejects
const size_t limit = (size_t)GetArg("-mempooltxinputlimit", 0);
{
LOCK(cs_main);
if (NetworkUpgradeActive(chainActive.Height() + 1, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
limit = 0;
}
}
if (limit > 0) {
size_t n = t_inputs_.size();
if (n > limit) {
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Too many transparent inputs %zu > limit %zu", n, limit));
}
}
*/
// update the transaction with these inputs
if (isUsingBuilder_) {
CScript scriptPubKey;
@@ -680,6 +657,7 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() {
pwalletMain->GetFilteredNotes(saplingEntries, fromaddress_, mindepth_);
}
// store sapling inputs so we can correctly lock and unlock them
for (auto entry : saplingEntries) {
z_sapling_inputs_.push_back(entry);
std::string data(entry.memo.begin(), entry.memo.end());