try this
This commit is contained in:
@@ -1472,7 +1472,7 @@ int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_
|
|||||||
int64_t komodo_checkcommission(CBlock *pblock,int32_t height)
|
int64_t komodo_checkcommission(CBlock *pblock,int32_t height)
|
||||||
{
|
{
|
||||||
int64_t checktoshis=0; uint8_t *script;
|
int64_t checktoshis=0; uint8_t *script;
|
||||||
if ( ASSETCHAINS_COMMISSION != 0 )
|
if ( ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_STREAM != 0)
|
||||||
{
|
{
|
||||||
checktoshis = komodo_commission(pblock);
|
checktoshis = komodo_commission(pblock);
|
||||||
if ( checktoshis > 10000 && pblock->vtx[0].vout.size() != 2 )
|
if ( checktoshis > 10000 && pblock->vtx[0].vout.size() != 2 )
|
||||||
@@ -1575,7 +1575,7 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
}
|
}
|
||||||
if ( failed == 0 && ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 )
|
if ( failed == 0 && ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 )
|
||||||
{
|
{
|
||||||
/*if ( height == 1 )
|
if ( height == 1 )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "checking override pubkey thingo \n");
|
fprintf(stderr, "checking override pubkey thingo \n");
|
||||||
script = (uint8_t *)pblock->vtx[0].vout[0].scriptPubKey.data();
|
script = (uint8_t *)pblock->vtx[0].vout[0].scriptPubKey.data();
|
||||||
@@ -1585,10 +1585,10 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{*/
|
{
|
||||||
if ( komodo_checkcommission(pblock,height) < 0 )
|
if ( komodo_checkcommission(pblock,height) < 0 )
|
||||||
return(-1);
|
return(-1);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"komodo_checkPOW possible.%d slowflag.%d ht.%d notaryid.%d failed.%d\n",possible,slowflag,height,notaryid,failed);
|
//fprintf(stderr,"komodo_checkPOW possible.%d slowflag.%d ht.%d notaryid.%d failed.%d\n",possible,slowflag,height,notaryid,failed);
|
||||||
if ( failed != 0 && possible == 0 && notaryid < 0 )
|
if ( failed != 0 && possible == 0 && notaryid < 0 )
|
||||||
|
|||||||
@@ -744,7 +744,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
checktoshis = 0;
|
checktoshis = 0;
|
||||||
if ( ASSETCHAINS_COMMISSION != 0 && height > 1 )
|
if ( (ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_STREAM != 0) && height > 1 )
|
||||||
{
|
{
|
||||||
if ( (checktoshis= komodo_checkcommission((CBlock *)&block,height)) < 0 )
|
if ( (checktoshis= komodo_checkcommission((CBlock *)&block,height)) < 0 )
|
||||||
{
|
{
|
||||||
@@ -1518,4 +1518,3 @@ void komodo_passport_iteration()
|
|||||||
printf("READY for %s RPC calls at %u! done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,(uint32_t)time(NULL),ASSETCHAINS_SYMBOL,refid);
|
printf("READY for %s RPC calls at %u! done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,(uint32_t)time(NULL),ASSETCHAINS_SYMBOL,refid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1597,7 +1597,7 @@ void komodo_args(char *argv0)
|
|||||||
printf("ASSETCHAINS_COMMISSION needs an ASETCHAINS_OVERRIDE_PUBKEY and cant be more than 100000000 (100%%)\n");
|
printf("ASSETCHAINS_COMMISSION needs an ASETCHAINS_OVERRIDE_PUBKEY and cant be more than 100000000 (100%%)\n");
|
||||||
} else if ( ASSETCHAINS_STREAM != 0) {
|
} else if ( ASSETCHAINS_STREAM != 0) {
|
||||||
ASSETCHAINS_STREAM = 0;
|
ASSETCHAINS_STREAM = 0;
|
||||||
printf("ASSETCHAINS_STREAM needs ASSETCHAINS_OVERRIDE_PUBKEY! This parameter has been ignored! \n");
|
printf("ASSETCHAINS_STREAM needs ASSETCHAINS_OVERRIDE_PUBKEY! This parameter has been ignored! \n %s",ASSETCHAINS_OVERRIDE_PUBKEY.c_str());
|
||||||
}
|
}
|
||||||
if ( ASSETCHAINS_STREAM != 0 && ASSETCHAINS_SUPPLY == 10 ) {
|
if ( ASSETCHAINS_STREAM != 0 && ASSETCHAINS_SUPPLY == 10 ) {
|
||||||
ASSETCHAINS_SUPPLY = 100000;
|
ASSETCHAINS_SUPPLY = 100000;
|
||||||
|
|||||||
@@ -3124,7 +3124,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
|
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
|
||||||
|
|
||||||
CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus()) + sum;
|
CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus()) + sum;
|
||||||
if ( ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 && ASSETCHAINS_COMMISSION != 0 )
|
if ( ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 && (ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_STREAM != 0) )
|
||||||
{
|
{
|
||||||
uint64_t checktoshis;
|
uint64_t checktoshis;
|
||||||
if ( (checktoshis= komodo_commission((CBlock *)&block)) != 0 )
|
if ( (checktoshis= komodo_commission((CBlock *)&block)) != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user