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