try to make miner spend p2pk utxo

This commit is contained in:
blackjok3r
2018-10-16 21:17:27 +08:00
parent dc92daa03c
commit fb0f519301
2 changed files with 32 additions and 2 deletions

View File

@@ -493,6 +493,26 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
return(0);
}
}
else if (( ASSETCHAINS_STREAM != 0 ) && ( ASSETCHAINS_SYMBOL[0] != 0 ))
{
CMutableTransaction txStream = CreateNewContextualCMutableTransaction(Params().GetConsensus(), chainActive.Height() + 1);
if ( komodo_notaryvin(txStream,ASSETCHAINS_OVERRIDE_PUBKEY33) > 0 )
{
CAmount txfees = 10000;
pblock->vtx.push_back(txStream);
pblocktemplate->vTxFees.push_back(txfees);
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStream));
nFees += txfees;
pblocktemplate->vTxFees[0] = -nFees;
//*(uint64_t *)(&pblock->vtx[0].vout[0].nValue) += txfees;
//fprintf(stderr,"added notaryvin\n");
}
else
{
fprintf(stderr,"error adding streamer vin, the chain broke! \n");
return(0);
}
}
else if ( ASSETCHAINS_CC == 0 && pindexPrev != 0 && ASSETCHAINS_STAKED == 0 && (ASSETCHAINS_SYMBOL[0] != 0 || IS_KOMODO_NOTARY == 0 || My_notaryid < 0) )
{
CValidationState state;