Ignore too-long redeemScripts while loading wallet

This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
This commit is contained in:
Wladimir J. van der Laan
2014-06-10 09:42:42 +02:00
parent e5ee8f016e
commit 18116b06c1
2 changed files with 17 additions and 1 deletions

View File

@@ -211,7 +211,7 @@ public:
// Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
bool AddCScript(const CScript& redeemScript);
bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); }
bool LoadCScript(const CScript& redeemScript);
/// Adds a destination data tuple to the store, and saves it to disk
bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value);