Browse Source

Fix copyright

pull/117/head
Duke Leto 4 years ago
parent
commit
4800f497aa
  1. 11
      src/wallet/asyncrpcoperation_saplingconsolidation.cpp
  2. 2
      src/wallet/asyncrpcoperation_saplingconsolidation.h
  3. 3
      src/wallet/wallet.cpp

11
src/wallet/asyncrpcoperation_saplingconsolidation.cpp

@ -95,15 +95,22 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() {
// an anchor at height N-10 for each SpendDescription
// Consider, should notes be sorted?
pwalletMain->GetFilteredNotes(saplingEntries, "", 11);
if(saplingEntries.size() == 0) {
LogPrint("zrpcunsafe", "%s: Nothing to consolidate, done.\n",opid);
return true;
}
if (fConsolidationMapUsed) {
const vector<string>& v = mapMultiArgs["-consolidatesaplingaddress"];
for(int i = 0; i < v.size(); i++) {
auto zAddress = DecodePaymentAddress(v[i]);
if (boost::get<libzcash::SaplingPaymentAddress>(&zAddress) != nullptr) {
libzcash::SaplingPaymentAddress saplingAddress = boost::get<libzcash::SaplingPaymentAddress>(zAddress);
addresses.insert(saplingAddress );
addresses.insert(saplingAddress);
} else {
//TODO: how to handle invalid zaddrs?
LogPrint("zrpcunsafe", "%s: Invalid zaddr, exiting\n", opid);
return false;
}
}
} else {

2
src/wallet/asyncrpcoperation_saplingconsolidation.h

@ -1,5 +1,5 @@
// Copyright (c) 2020 The Hush developers
// TODO: Forge should add his preferred copyright line here
// Copyright (c) 2019 CryptoForge
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

3
src/wallet/wallet.cpp

@ -1733,8 +1733,7 @@ void CWallet::GetSaplingNoteWitnesses(std::vector<SaplingOutPoint> notes,
//fprintf(stderr,"%s: rt=%s\n",__func__,rt.GetHash().ToString().c_str());
//fprintf(stderr,"%s: witnesses[%d]->root()=%s\n",__func__,i,witnesses[i]->root().GetHash().ToString().c_str());
// Something is fucky
std::string err = "CWallet::GetSaplingNoteWitnesses: Invalid witness root! i=";
err += i;
std::string err = "CWallet::GetSaplingNoteWitnesses: Invalid witness root!";
throw std::logic_error(err);
}

Loading…
Cancel
Save