Replace CScriptID and CKeyID in CTxDestination with dedicated type

This commit is contained in:
Gregory Sanders 2019-02-19 17:00:45 -05:00 committed by Steven Roose
parent 3e7cff1e45
commit aa375e66c1
No known key found for this signature in database
GPG key ID: 7FC91380BB4CE800
28 changed files with 201 additions and 179 deletions

View file

@ -182,7 +182,7 @@ static bool CheckPeginTx(const std::vector<unsigned char>& tx_data, T& pegtx, co
// Check that the witness program matches the p2ch on the p2sh-p2wsh transaction output
CScript tweaked_fedpegscript = calculate_contract(Params().GetConsensus().fedpegScript, claim_script);
CScript witness_output(GetScriptForWitness(tweaked_fedpegscript));
CScript expected_script(CScript() << OP_HASH160 << ToByteVector(CScriptID(witness_output)) << OP_EQUAL);
CScript expected_script(CScript() << OP_HASH160 << ToByteVector(ScriptHash(CScriptID(witness_output))) << OP_EQUAL);
if (pegtx->vout[prevout.n].scriptPubKey != expected_script) {
return false;
}