Correct AuxPoW coinbase script concatenation operators.
MakeCoinbaseWithAux() was incorrectly using << to add a CScript onto a CScript instead of the + operator. Operators corrected and structure now more closely reflects coinbase script assembly done elsewhere.
This commit is contained in:
parent
223ed2eadd
commit
23bcb1bbd2
|
@ -109,8 +109,12 @@ CScript MakeCoinbaseWithAux(unsigned int nHeight, unsigned int nExtraNonce, vect
|
||||||
vector<unsigned char> vchAuxWithHeader(UBEGIN(pchMergedMiningHeader), UEND(pchMergedMiningHeader));
|
vector<unsigned char> vchAuxWithHeader(UBEGIN(pchMergedMiningHeader), UEND(pchMergedMiningHeader));
|
||||||
vchAuxWithHeader.insert(vchAuxWithHeader.end(), vchAux.begin(), vchAux.end());
|
vchAuxWithHeader.insert(vchAuxWithHeader.end(), vchAux.begin(), vchAux.end());
|
||||||
|
|
||||||
|
CScript script = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
|
||||||
|
|
||||||
// Push OP_2 just in case we want versioning later
|
// Push OP_2 just in case we want versioning later
|
||||||
return CScript() << nHeight << CScriptNum(nExtraNonce) << COINBASE_FLAGS << OP_2 << vchAuxWithHeader;
|
script = script << OP_2 << vchAuxWithHeader;
|
||||||
|
|
||||||
|
return script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue