From 99c94fc3f2c8754b9c13b57588b7090f65d1b59c Mon Sep 17 00:00:00 2001 From: miketout Date: Thu, 1 Nov 2018 16:12:03 -0700 Subject: [PATCH] Indicate cheatcatcher active or error if bad sapling address --- src/miner.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 1327c053f..e88ce4ac4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1911,13 +1911,27 @@ void static BitcoinMiner() libzcash::PaymentAddress addr = DecodePaymentAddress(VERUS_CHEATCATCHER); if (VERUS_CHEATCATCHER.size() > 0 && IsValidPaymentAddress(addr)) { - cheatCatcher = boost::get(addr); + try + { + cheatCatcher = boost::get(addr); + } + catch (...) + { + } } - else + if (VERUS_CHEATCATCHER.size() > 0) { - if (VERUS_CHEATCATCHER.size() > 0) + if (cheatCatcher == boost::none) + { + LogPrintf("ERROR: -cheatcatcher parameter is invalid Sapling payment address\n"); fprintf(stderr, "-cheatcatcher parameter is invalid Sapling payment address\n"); - } + } + else + { + LogPrintf("Cheat Catcher active on %s\n", VERUS_CHEATCATCHER.c_str()); + fprintf(stderr, "Cheat Catcher active on %s\n", VERUS_CHEATCATCHER.c_str()); + } + } static boost::thread_group* minerThreads = NULL;