Always log when skipping a zaddr during z_importwallet
This commit is contained in:
@@ -515,14 +515,15 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys
|
|||||||
auto addResult = boost::apply_visitor(
|
auto addResult = boost::apply_visitor(
|
||||||
AddSpendingKeyToWallet(pwalletMain, Params().GetConsensus(), nTime, hdKeypath, seedFpStr, true), spendingkey);
|
AddSpendingKeyToWallet(pwalletMain, Params().GetConsensus(), nTime, hdKeypath, seedFpStr, true), spendingkey);
|
||||||
if (addResult == KeyAlreadyExists){
|
if (addResult == KeyAlreadyExists){
|
||||||
LogPrint("zrpc", "Skipping import of zaddr (key already present)\n");
|
LogPrintf("%s: Skipping import of zaddr (key already present)\n", __func__);
|
||||||
} else if (addResult == KeyNotAdded) {
|
} else if (addResult == KeyNotAdded) {
|
||||||
// Something went wrong
|
// Something went wrong
|
||||||
fGood = false;
|
fGood = false;
|
||||||
|
LogPrintf("%s: Skipping import of zaddr (something went wrong)\n", __func__);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
LogPrint("zrpc", "Importing detected an error: invalid spending key. Trying as a transparent key...\n");
|
LogPrintf("%s: Importing detected an error: invalid spending key. Trying as a transparent key...\n",__func__);
|
||||||
// Not a valid spending key, so carry on and see if it's a Hush transparent address
|
// Not a valid spending key, so carry on and see if it's a Hush transparent address
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user