| 19 | BOOST_FIXTURE_TEST_SUITE(multisig_tests, BasicTestingSetup) |
| 20 | |
| 21 | static CScript |
| 22 | sign_multisig(const CScript& scriptPubKey, const std::vector<CKey>& keys, const CTransaction& transaction, int whichIn) |
| 23 | { |
| 24 | uint256 hash = SignatureHash(scriptPubKey, transaction, whichIn, SIGHASH_ALL, 0, SigVersion::BASE, 0); |
| 25 | |
| 26 | CScript result; |
| 27 | result << OP_0; // CHECKMULTISIG bug workaround |
| 28 | for (const CKey &key : keys) |
| 29 | { |
| 30 | std::vector<unsigned char> vchSig; |
| 31 | BOOST_CHECK(key.Sign(hash, vchSig)); |
| 32 | vchSig.push_back((unsigned char)SIGHASH_ALL); |
| 33 | result << vchSig; |
| 34 | } |
| 35 | return result; |
| 36 | } |
| 37 | |
| 38 | BOOST_AUTO_TEST_CASE(multisig_verify) |
| 39 | { |
no test coverage detected