You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (scriptType != TxoutType::WITNESS_V0_KEYHASH || Params().NetworkIDString() == CBaseChainParams::MAIN) { // this is a script we don't recognize
600
+
if (gArgs.GetBoolArg("-debug", false) && gArgs.GetBoolArg("-printcoinstake", false))
601
+
LogPrintf("%s : no support for %s kernel type=%s\n", __func__, GetTxnOutputType(whichType), GetTxnOutputType(scriptType));
602
+
continue;
603
+
}
604
+
whichType = scriptType;
605
+
} else {
606
+
if (gArgs.GetBoolArg("-debug", false) && gArgs.GetBoolArg("-printcoinstake", false))
607
+
LogPrintf("%s : failed to get script for kernel type=%s\n", __func__, GetTxnOutputType(whichType));
608
+
continue; // unable to find corresponding script
609
+
}
610
+
}
611
+
612
+
if (gArgs.GetBoolArg("-quantumsafestaking", false)) { // a new bech32 address is generated for every stake to protect the public key from quantum computers
613
+
OutputType output_type = OutputType::BECH32;
614
+
CTxDestination dest;
615
+
std::string error;
616
+
if (pwallet->GetNewChangeDestination(output_type, dest, error)) {
617
+
LogPrintf("%s : using new destination for coinstake (%s)\n", __func__, EncodeDestination(dest));
618
+
scriptPubKeyOut = GetScriptForDestination(dest);
619
+
} else {
620
+
LogPrintf("%s : failed to get new destination for coinstake (%s)\n", __func__, error);
621
+
scriptPubKeyOut = scriptPubKeyKernel;
622
+
}
623
+
} elseif (!pwallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { // on legacy wallets we can convert every input to p2pk for smaller coinstake TXs
0 commit comments