This commit is contained in:
Duke Leto
2020-06-06 05:14:21 -04:00
parent 22d4d1a06e
commit f13171efc6
7 changed files with 9 additions and 29 deletions

View File

@@ -101,7 +101,7 @@ extern int32_t KOMODO_SNAPSHOT_INTERVAL;
extern void komodo_init(int32_t height); extern void komodo_init(int32_t height);
ZCJoinSplit* pzcashParams = NULL; //ZCJoinSplit* pzcashParams = NULL;
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
CWallet* pwalletMain = NULL; CWallet* pwalletMain = NULL;
@@ -305,8 +305,8 @@ void Shutdown()
delete pwalletMain; delete pwalletMain;
pwalletMain = NULL; pwalletMain = NULL;
#endif #endif
delete pzcashParams; //delete pzcashParams;
pzcashParams = NULL; //pzcashParams = NULL;
globalVerifyHandle.reset(); globalVerifyHandle.reset();
ECC_Stop(); ECC_Stop();
LogPrintf("%s: done\n", __func__); LogPrintf("%s: done\n", __func__);

View File

@@ -23,7 +23,7 @@
#include <string> #include <string>
#include "zcash/JoinSplit.hpp" //#include "zcash/JoinSplit.hpp"
class CScheduler; class CScheduler;
class CWallet; class CWallet;
@@ -34,7 +34,7 @@ class thread_group;
} // namespace boost } // namespace boost
extern CWallet* pwalletMain; extern CWallet* pwalletMain;
extern ZCJoinSplit* pzcashParams; //extern ZCJoinSplit* pzcashParams;
void StartShutdown(); void StartShutdown();
bool ShutdownRequested(); bool ShutdownRequested();

View File

@@ -1367,15 +1367,6 @@ bool CheckTransaction(uint32_t tiptime,const CTransaction& tx, CValidationState
if (!CheckTransactionWithoutProofVerification(tiptime,tx, state)) { if (!CheckTransactionWithoutProofVerification(tiptime,tx, state)) {
return false; return false;
} else {
// Ensure that zk-SNARKs v|| y
BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit) {
if (!joinsplit.Verify(*pzcashParams, verifier, tx.joinSplitPubKey)) {
return state.DoS(100, error("CheckTransaction(): joinsplit does not verify"),
REJECT_INVALID, "bad-txns-joinsplit-verification-failed");
}
}
return true;
} }
} }

View File

@@ -288,7 +288,7 @@ int printMiningStatus(bool mining)
} else if (IsInitialBlockDownload()) { } else if (IsInitialBlockDownload()) {
std::cout << _("Mining is paused while downloading blocks.") << std::endl; std::cout << _("Mining is paused while downloading blocks.") << std::endl;
} else { } else {
std::cout << _("Mining is paused (a JoinSplit may be in progress).") << std::endl; std::cout << _("Mining is paused, enhance your calm") << std::endl;
} }
} }
lines++; lines++;

View File

@@ -140,9 +140,6 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
} else { } else {
LogPrint("zrpc", "%s: z_sendmany initialized\n", getId()); LogPrint("zrpc", "%s: z_sendmany initialized\n", getId());
} }
// Enable payment disclosure if requested
paymentDisclosureMode = false;
} }
AsyncRPCOperation_sendmany::~AsyncRPCOperation_sendmany() { AsyncRPCOperation_sendmany::~AsyncRPCOperation_sendmany() {

View File

@@ -5135,7 +5135,6 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp, const CPubKey& myp
#define MERGE_TO_ADDRESS_DEFAULT_SPROUT_LIMIT 10 #define MERGE_TO_ADDRESS_DEFAULT_SPROUT_LIMIT 10
#define MERGE_TO_ADDRESS_DEFAULT_SAPLING_LIMIT 90 #define MERGE_TO_ADDRESS_DEFAULT_SAPLING_LIMIT 90
#define JOINSPLIT_SIZE GetSerializeSize(JSDescription(), SER_NETWORK, PROTOCOL_VERSION)
#define OUTPUTDESCRIPTION_SIZE GetSerializeSize(OutputDescription(), SER_NETWORK, PROTOCOL_VERSION) #define OUTPUTDESCRIPTION_SIZE GetSerializeSize(OutputDescription(), SER_NETWORK, PROTOCOL_VERSION)
#define SPENDDESCRIPTION_SIZE GetSerializeSize(SpendDescription(), SER_NETWORK, PROTOCOL_VERSION) #define SPENDDESCRIPTION_SIZE GetSerializeSize(SpendDescription(), SER_NETWORK, PROTOCOL_VERSION)
@@ -5154,7 +5153,6 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
if (fHelp || params.size() < 2 || params.size() > 7) if (fHelp || params.size() < 2 || params.size() > 7)
throw runtime_error( throw runtime_error(
"z_mergetoaddress [\"fromaddress\", ... ] \"toaddress\" ( fee ) ( transparent_limit ) ( shielded_limit ) ( memo )\n" "z_mergetoaddress [\"fromaddress\", ... ] \"toaddress\" ( fee ) ( transparent_limit ) ( shielded_limit ) ( memo )\n"
+ strDisabledMsg +
"\nMerge multiple UTXOs and notes into a single UTXO or note. Coinbase UTXOs are ignored; use `z_shieldcoinbase`" "\nMerge multiple UTXOs and notes into a single UTXO or note. Coinbase UTXOs are ignored; use `z_shieldcoinbase`"
"\nto combine those into a single note." "\nto combine those into a single note."
"\n\nThis is an asynchronous operation, and UTXOs selected for merging will be locked. If there is an error, they" "\n\nThis is an asynchronous operation, and UTXOs selected for merging will be locked. If there is an error, they"
@@ -5198,14 +5196,10 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
" \"opid\": xxx (string) An operationid to pass to z_getoperationstatus to get the result of the operation.\n" " \"opid\": xxx (string) An operationid to pass to z_getoperationstatus to get the result of the operation.\n"
"}\n" "}\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("z_mergetoaddress", "'[\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"]' ztfaW34Gj9FrnGUEf833ywDVL62NWXBM81u6EQnM6VR45eYnXhwztecW1SjxA7JrmAXKJhxhj3vDNEpVCQoSvVoSpmbhtjf") + HelpExampleCli("z_mergetoaddress", "'[\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"]' zs1aW34Gj9FrnGUEf833ywDVL62NWXBM81u6EQnM6VR45eYnXhwztecW1SjxA7JrmAXKJhxhj3vDNEpVCQoSvVoSpmbhtjf")
+ HelpExampleRpc("z_mergetoaddress", "[\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"], \"ztfaW34Gj9FrnGUEf833ywDVL62NWXBM81u6EQnM6VR45eYnXhwztecW1SjxA7JrmAXKJhxhj3vDNEpVCQoSvVoSpmbhtjf\"") + HelpExampleRpc("z_mergetoaddress", "[\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"], \"zs1aW34Gj9FrnGUEf833ywDVL62NWXBM81u6EQnM6VR45eYnXhwztecW1SjxA7JrmAXKJhxhj3vDNEpVCQoSvVoSpmbhtjf\"")
); );
if (!fEnableMergeToAddress) {
throw JSONRPCError(RPC_WALLET_ERROR, "Error: z_mergetoaddress is disabled.");
}
LOCK2(cs_main, pwalletMain->cs_wallet); LOCK2(cs_main, pwalletMain->cs_wallet);
THROW_IF_SYNCING(KOMODO_INSYNC); THROW_IF_SYNCING(KOMODO_INSYNC);

View File

@@ -4781,7 +4781,6 @@ bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectAbsurdFee)
* These notes are decrypted and added to the output parameter vector, outEntries. * These notes are decrypted and added to the output parameter vector, outEntries.
*/ */
void CWallet::GetFilteredNotes( void CWallet::GetFilteredNotes(
std::vector<CSproutNotePlaintextEntry>& sproutEntries,
std::vector<SaplingNoteEntry>& saplingEntries, std::vector<SaplingNoteEntry>& saplingEntries,
std::string address, std::string address,
int minDepth, int minDepth,
@@ -4794,7 +4793,7 @@ void CWallet::GetFilteredNotes(
filterAddresses.insert(DecodePaymentAddress(address)); filterAddresses.insert(DecodePaymentAddress(address));
} }
GetFilteredNotes(sproutEntries, saplingEntries, filterAddresses, minDepth, INT_MAX, ignoreSpent, requireSpendingKey); GetFilteredNotes(saplingEntries, filterAddresses, minDepth, INT_MAX, ignoreSpent, requireSpendingKey);
} }
/** /**
@@ -4803,7 +4802,6 @@ void CWallet::GetFilteredNotes(
* These notes are decrypted and added to the output parameter vector, outEntries. * These notes are decrypted and added to the output parameter vector, outEntries.
*/ */
void CWallet::GetFilteredNotes( void CWallet::GetFilteredNotes(
std::vector<CSproutNotePlaintextEntry>& sproutEntries,
std::vector<SaplingNoteEntry>& saplingEntries, std::vector<SaplingNoteEntry>& saplingEntries,
std::set<PaymentAddress>& filterAddresses, std::set<PaymentAddress>& filterAddresses,
int minDepth, int minDepth,