This commit is contained in:
jl777
2019-01-12 07:48:13 -11:00
parent e3110f16fb
commit 6f345c4ed1
2 changed files with 6 additions and 6 deletions

View File

@@ -1162,7 +1162,7 @@ uint64_t komodo_commission(const CBlock *pblock,int32_t height)
n = pblock->vtx[i].vout.size(); n = pblock->vtx[i].vout.size();
for (j=0; j<n; j++) for (j=0; j<n; j++)
{ {
//fprintf(stderr,"(%d %.8f).%d ",i,dstr(block.vtx[i].vout[j].nValue),j); fprintf(stderr,"(%d %.8f).%d ",i,dstr(block.vtx[i].vout[j].nValue),j);
if ( i != 0 || j != 1 ) if ( i != 0 || j != 1 )
total += pblock->vtx[i].vout[j].nValue; total += pblock->vtx[i].vout[j].nValue;
} }
@@ -1708,10 +1708,10 @@ int64_t komodo_checkcommission(CBlock *pblock,int32_t height)
{ {
script = (uint8_t *)&pblock->vtx[0].vout[1].scriptPubKey[0]; script = (uint8_t *)&pblock->vtx[0].vout[1].scriptPubKey[0];
scriptlen = (int32_t)pblock->vtx[0].vout[1].scriptPubKey.size(); scriptlen = (int32_t)pblock->vtx[0].vout[1].scriptPubKey.size();
int32_t i; //int32_t i;
for (i=0; i<scriptlen; i++) //for (i=0; i<scriptlen; i++)
fprintf(stderr,"%02x",script[i]); // fprintf(stderr,"%02x",script[i]);
fprintf(stderr," vout[1] %.8f vs %.8f\n",(double)checktoshis/COIN,(double)pblock->vtx[0].vout[1].nValue/COIN); //fprintf(stderr," vout[1] %.8f vs %.8f\n",(double)checktoshis/COIN,(double)pblock->vtx[0].vout[1].nValue/COIN);
if ( ASSETCHAINS_SCRIPTPUB.size() > 1 ) if ( ASSETCHAINS_SCRIPTPUB.size() > 1 )
{ {
if ( ASSETCHAINS_SCRIPTPUB.size()/2 == scriptlen && scriptlen < sizeof(scripthex) ) if ( ASSETCHAINS_SCRIPTPUB.size()/2 == scriptlen && scriptlen < sizeof(scripthex) )

View File

@@ -576,7 +576,7 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
} }
//printf("autocreate commision vout\n"); //printf("autocreate commision vout\n");
} }
else if ((uint64_t)(txNew.vout[0].nValue) >= ASSETCHAINS_TIMELOCKGTE) else if ( (uint64_t)(txNew.vout[0].nValue) >= ASSETCHAINS_TIMELOCKGTE)
{ {
int32_t opretlen, p2shlen, scriptlen; int32_t opretlen, p2shlen, scriptlen;
CScriptExt opretScript = CScriptExt(); CScriptExt opretScript = CScriptExt();