| 392 | bool fWalletUnlockStakingOnly = false; |
| 393 | |
| 394 | bool CWallet::LoadCScript(const CScript& redeemScript) |
| 395 | { |
| 396 | /* A sanity check was added in pull #3843 to avoid adding redeemScripts |
| 397 | * that never can be redeemed. However, old wallets may still contain |
| 398 | * these. Do not add them to the wallet and warn. */ |
| 399 | if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) { |
| 400 | std::string strAddr = EncodeDestination(CScriptID(redeemScript)); |
| 401 | LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i which exceeds maximum size %i thus can never be redeemed. Do not use address %s.\n", |
| 402 | __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr); |
| 403 | return true; |
| 404 | } |
| 405 | |
| 406 | return CCryptoKeyStore::AddCScript(redeemScript); |
| 407 | } |
| 408 | |
| 409 | bool CWallet::AddWatchOnly(const CScript& dest) |
| 410 | { |
no test coverage detected