|
|
@ -2202,7 +2202,8 @@ bool CBlock::AcceptBlock(CValidationState &state, CDiskBlockPos *dbp) |
|
|
|
(fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 51, 100))) |
|
|
|
(fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 51, 100))) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CScript expect = CScript() << nHeight; |
|
|
|
CScript expect = CScript() << nHeight; |
|
|
|
if (!std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin())) |
|
|
|
if (vtx[0].vin[0].scriptSig.size() < expect.size() || |
|
|
|
|
|
|
|
!std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin())) |
|
|
|
return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase")); |
|
|
|
return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|