| 286 | } |
| 287 | |
| 288 | bool LegacyDataSPKM::LoadCScript(const CScript& redeemScript) |
| 289 | { |
| 290 | /* A sanity check was added in pull #3843 to avoid adding redeemScripts |
| 291 | * that never can be redeemed. However, old wallets may still contain |
| 292 | * these. Do not add them to the wallet and warn. */ |
| 293 | if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) |
| 294 | { |
| 295 | std::string strAddr = EncodeDestination(ScriptHash(redeemScript)); |
| 296 | WalletLogPrintf("%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", __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr); |
| 297 | return true; |
| 298 | } |
| 299 | |
| 300 | return FillableSigningProvider::AddCScript(redeemScript); |
| 301 | } |
| 302 | |
| 303 | void LegacyDataSPKM::LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata& meta) |
| 304 | { |
no test coverage detected