Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | |||||
bool CWallet::LoadCScript(const CScript &redeemScript) { | bool CWallet::LoadCScript(const CScript &redeemScript) { | ||||
/** | /** | ||||
* A sanity check was added in pull #3843 to avoid adding redeemScripts that | * A sanity check was added in pull #3843 to avoid adding redeemScripts that | ||||
* never can be redeemed. However, old wallets may still contain these. Do | * never can be redeemed. However, old wallets may still contain these. Do | ||||
* not add them to the wallet and warn. | * not add them to the wallet and warn. | ||||
*/ | */ | ||||
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) { | if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) { | ||||
std::string strAddr = EncodeDestination(CScriptID(redeemScript)); | std::string strAddr = | ||||
EncodeDestination(CScriptID(redeemScript), GetConfig()); | |||||
LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i " | LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i " | ||||
"which exceeds maximum size %i thus can never be redeemed. " | "which exceeds maximum size %i thus can never be redeemed. " | ||||
"Do not use address %s.\n", | "Do not use address %s.\n", | ||||
__func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, | __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, | ||||
strAddr); | strAddr); | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 4,310 Lines • Show Last 20 Lines |