Changeset View
Changeset View
Standalone View
Standalone View
src/test/sighash_tests.cpp
Show All 29 Lines | static const uint256 one(uint256S( | ||||
"0000000000000000000000000000000000000000000000000000000000000001")); | "0000000000000000000000000000000000000000000000000000000000000001")); | ||||
if (nIn >= txTo.vin.size()) { | if (nIn >= txTo.vin.size()) { | ||||
return one; | return one; | ||||
} | } | ||||
CMutableTransaction txTmp(txTo); | CMutableTransaction txTmp(txTo); | ||||
// In case concatenating two scripts ends up with two codeseparators, or an | // In case concatenating two scripts ends up with two codeseparators, or an | ||||
// extra one at the end, this prevents all those possible incompatibilities. | // extra one at the end, this prevents all those possible incompatibilities. | ||||
scriptCode.FindAndDelete(CScript(OP_CODESEPARATOR)); | FindAndDelete(scriptCode, CScript(OP_CODESEPARATOR)); | ||||
// Blank out other inputs' signatures | // Blank out other inputs' signatures | ||||
for (auto &in : txTmp.vin) { | for (auto &in : txTmp.vin) { | ||||
in.scriptSig = CScript(); | in.scriptSig = CScript(); | ||||
} | } | ||||
txTmp.vin[nIn].scriptSig = scriptCode; | txTmp.vin[nIn].scriptSig = scriptCode; | ||||
// Blank out some of the outputs | // Blank out some of the outputs | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |