Cap -ac_perc to be based on million max

This commit is contained in:
jl777
2019-01-13 05:34:42 -11:00
parent c334d5c2e4
commit e06138fecf
3 changed files with 10 additions and 17 deletions

View File

@@ -1165,10 +1165,12 @@ uint64_t komodo_commission(const CBlock *pblock,int32_t height)
//fprintf(stderr,"(%d %.8f).%d ",i,dstr(pblock->vtx[i].vout[j].nValue),j);
if ( i != 0 || j != 1 )
total += pblock->vtx[i].vout[j].nValue;
if ( total > 1000000 * COIN )
total = 1000000 * COIN;
}
}
commission = ((total / 10000) * ASSETCHAINS_COMMISSION) / 10000;
//commission = ((total * ASSETCHAINS_COMMISSION) / COIN);
//commission = ((total / 10000) * ASSETCHAINS_COMMISSION) / 10000;
commission = ((total * ASSETCHAINS_COMMISSION) / COIN);
}
if ( commission < 10000 )
commission = 0;