script: move CScriptID to standard.h and add a ctor for creating them from CScripts
This allows for a reversal of the current behavior. This: CScript foo; CScriptID bar(foo.GetID()); Becomes: CScript foo; CScriptID bar(foo); This way, CScript is no longer dependent on CScriptID or Hash();
This commit is contained in:
@@ -158,7 +158,7 @@ bool CWallet::LoadCScript(const CScript& redeemScript)
|
||||
* these. Do not add them to the wallet and warn. */
|
||||
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
|
||||
{
|
||||
std::string strAddr = CBitcoinAddress(redeemScript.GetID()).ToString();
|
||||
std::string strAddr = CBitcoinAddress(CScriptID(redeemScript)).ToString();
|
||||
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",
|
||||
__func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user