not a chance this will work?

This commit is contained in:
blackjok3r
2018-10-16 23:02:47 +08:00
parent a11c10fdd2
commit 1f5efd44aa
2 changed files with 21 additions and 3 deletions

View File

@@ -1575,14 +1575,25 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
}
if ( failed == 0 && ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 )
{
if ( height == 1 || ASSETCHAINS_STREAM != 0 )
if ( height == 1 )
{
script = (uint8_t *)pblock->vtx[0].vout[0].scriptPubKey.data();
if ( script[0] != 33 || script[34] != OP_CHECKSIG || memcmp(script+1,ASSETCHAINS_OVERRIDE_PUBKEY33,33) != 0 ) {
return(-1);
}
}
else
else if ( ASSETCHAINS_STREAM != 0 ) {
int lasttx = ( pblock->vtx.size() -1 );
uint256 hash; CTransaction tx; CTxIn& txin;
txin = pblock->vtx[lasttx];
if (GetTransaction(txin.prevout.hash,tx,hash,false))
{
script = (uint8_t *)tx.vout[txin.prevout.n].scriptPubKey.data();
if ( script[0] != 33 || script[34] != OP_CHECKSIG || memcmp(script+1,ASSETCHAINS_OVERRIDE_PUBKEY33,33) != 0 ) {
return(-1);
}
}
} else
{
if ( komodo_checkcommission(pblock,height) < 0 )
return(-1);