| 775 | } |
| 776 | |
| 777 | bool LegacyScriptPubKeyMan::LoadCScript(const CScript& redeemScript) |
| 778 | { |
| 779 | /* A sanity check was added in pull #3843 to avoid adding redeemScripts |
| 780 | * that never can be redeemed. However, old wallets may still contain |
| 781 | * these. Do not add them to the wallet and warn. */ |
| 782 | if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) |
| 783 | { |
| 784 | std::string strAddr = EncodeDestination(ScriptHash(redeemScript)); |
| 785 | 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); |
| 786 | return true; |
| 787 | } |
| 788 | |
| 789 | return FillableSigningProvider::AddCScript(redeemScript); |
| 790 | } |
| 791 | |
| 792 | void LegacyScriptPubKeyMan::LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata& meta) |
| 793 | { |
no test coverage detected