Closed dexX7 closed 9 years ago
My private branch has:
#if CLIENT_VERSION_MINOR < 10
#include "key.h"
#include "script.h"
#elif CLIENT_VERSION_MINOR == 10
#include "pubkey.h"
#include "script/script.h"
#include "script/standard.h"
#endif
#if CLIENT_VERSION_MINOR < 10
CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys)
{
CScript script;
script.SetMultisig(nRequired, keys);
return script;
}
CScript GetScriptForDestination(const CTxDestination& dest)
{
CScript script;
script.SetDestination(dest);
return script;
}
#endif
... but it's really a question whether an upgrade or downgrade (from 0.10 to 0.9 and vice versa) should be aimed for.
Background: 0.10 doesn't have Script::SetDestination anymore, but Script::GetScriptForDestination.
Edit: nevertheless, I think it should be aimed for. But I will withhold such changes for now, unless it gets green light.
There was exactly one use of CScript::mscore_getHex(), so it was replaced to reduce the impact on Bitcoin Core. Instead of using a modified version of CScript::ToString(), CScript::mscore_parse() was replaced by an external function, which collects pushed values in a script.
The original state of script.h is now contained.
Build confirmation: https://travis-ci.org/dexX7/mastercore/builds/45404574
The other friends on TODO: GetScriptForDestination(), GetScriptForMultisig() and maybe GetDustLimit().