Prevector type

This commit is contained in:
Pieter Wuille
2015-10-29 07:11:24 +01:00
parent 4f09b77c7f
commit 114b5812f6
19 changed files with 874 additions and 68 deletions

View File

@@ -260,7 +260,7 @@ public:
TestBuilder& PushRedeem()
{
DoPush(static_cast<std::vector<unsigned char> >(scriptPubKey));
DoPush(std::vector<unsigned char>(scriptPubKey.begin(), scriptPubKey.end()));
return *this;
}
@@ -892,7 +892,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSigCopy, scriptSig);
BOOST_CHECK(combined == scriptSigCopy || combined == scriptSig);
// dummy scriptSigCopy with placeholder, should always choose non-placeholder:
scriptSigCopy = CScript() << OP_0 << static_cast<vector<unsigned char> >(pkSingle);
scriptSigCopy = CScript() << OP_0 << vector<unsigned char>(pkSingle.begin(), pkSingle.end());
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSigCopy, scriptSig);
BOOST_CHECK(combined == scriptSig);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, scriptSigCopy);