Remove commented out code
This commit is contained in:
@@ -409,33 +409,8 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
|||||||
if(fZdebug)
|
if(fZdebug)
|
||||||
LogPrintf("%s: Selecting Sapling notes\n", __FUNCTION__);
|
LogPrintf("%s: Selecting Sapling notes\n", __FUNCTION__);
|
||||||
std::vector<SaplingOutPoint> ops;
|
std::vector<SaplingOutPoint> ops;
|
||||||
std::vector<SaplingNote> notes;
|
|
||||||
CAmount sum = 0;
|
CAmount sum = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
//NOTE: z_sapling_inputs_ is a list of all potential notes to spend
|
|
||||||
// saplingNoteInputs_ is a list of notes we will actually spend
|
|
||||||
// and need to lock. It is a subset of z_sapling_inputs_
|
|
||||||
for (const auto t : z_sapling_inputs_) {
|
|
||||||
// locked status of these inputs may have changed, check again
|
|
||||||
const bool isLocked = pwalletMain->IsLockedNote(t.op);
|
|
||||||
if (isLocked) {
|
|
||||||
LogPrintf("%s: skipping locked note %s\n", __func__, t.op.hash.ToString().substr(0,10).c_str());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// keep track of currently unlocked notes to lock later on in lock_notes()
|
|
||||||
saplingNoteInputs_.emplace_back(t.op, t.note, t.note.value() );
|
|
||||||
|
|
||||||
ops.push_back(t.op);
|
|
||||||
notes.push_back(t.note);
|
|
||||||
sum += t.note.value();
|
|
||||||
if (sum >= targetAmount) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for(const auto t : saplingNoteInputs_) {
|
for(const auto t : saplingNoteInputs_) {
|
||||||
ops.push_back(std::get<0>(t));
|
ops.push_back(std::get<0>(t));
|
||||||
}
|
}
|
||||||
@@ -455,9 +430,9 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
|||||||
for (size_t i = 0; i < saplingNoteInputs_.size(); i++) {
|
for (size_t i = 0; i < saplingNoteInputs_.size(); i++) {
|
||||||
//LOCK2(cs_main, pwalletMain->cs_wallet);
|
//LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
|
|
||||||
|
//TODO: avoid coredump here if this index does not exist
|
||||||
if (!witnesses[i]) {
|
if (!witnesses[i]) {
|
||||||
throw JSONRPCError(RPC_WALLET_ERROR,
|
throw JSONRPCError(RPC_WALLET_ERROR,
|
||||||
//strprintf( "Missing witness for Sapling note at outpoint %s", saplingNoteInputs_[i].op.ToString())
|
|
||||||
strprintf( "Missing witness for Sapling note at outpoint %s", std::get<0>(saplingNoteInputs_[i]).ToString())
|
strprintf( "Missing witness for Sapling note at outpoint %s", std::get<0>(saplingNoteInputs_[i]).ToString())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user