mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
Move CTxDestination from script/script to script/standard
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "key.h"
|
||||
#include "script/script.h"
|
||||
#include "script/standard.h"
|
||||
#include "uint256.h"
|
||||
|
||||
#include <vector>
|
||||
@@ -37,8 +38,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
|
||||
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U);
|
||||
BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U);
|
||||
|
||||
CScript p2sh;
|
||||
p2sh.SetDestination(s1.GetID());
|
||||
CScript p2sh = GetScriptForDestination(s1.GetID());
|
||||
CScript scriptSig;
|
||||
scriptSig << OP_0 << Serialize(s1);
|
||||
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U);
|
||||
@@ -50,12 +50,11 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
|
||||
k.MakeNewKey(true);
|
||||
keys.push_back(k.GetPubKey());
|
||||
}
|
||||
CScript s2;
|
||||
s2.SetMultisig(1, keys);
|
||||
CScript s2 = GetScriptForMultisig(1, keys);
|
||||
BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U);
|
||||
BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U);
|
||||
|
||||
p2sh.SetDestination(s2.GetID());
|
||||
p2sh = GetScriptForDestination(s2.GetID());
|
||||
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U);
|
||||
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U);
|
||||
CScript scriptSig2;
|
||||
|
||||
Reference in New Issue
Block a user