This commit is contained in:
jl777
2018-07-12 01:16:41 -11:00
parent 1ec2a42ff3
commit 3118a07000
2 changed files with 3 additions and 3 deletions

View File

@@ -1539,7 +1539,7 @@ int64_t komodo_newcoins(int64_t *zfundsp,int32_t nHeight,CBlock *pblock)
for (i=0; i<n; i++)
{
CTransaction vintx,&tx = pblock->vtx[i];
zfunds += (tx.GetJoinSplitValueIn() - tx.GetJoinSplitValueOut());
zfunds += (tx.GetJoinSplitValueOut() - tx.GetJoinSplitValueIn());
if ( (m= tx.vin.size()) > 0 )
{
for (j=0; j<m; j++)
@@ -1597,7 +1597,7 @@ int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height)
}
supply += pindex->newcoins;
zfunds += pindex->zfunds;
//printf("start ht.%d new %.8f -> supply %.8f\n",pindex->nHeight,dstr(pindex->newcoins),dstr(supply));
//printf("start ht.%d new %.8f -> supply %.8f zfunds %.8f -> %.8f\n",pindex->nHeight,dstr(pindex->newcoins),dstr(supply),dstr(pindex->zfunds),dstr(zfunds));
pindex = pindex->pprev;
}
}

View File

@@ -1104,7 +1104,7 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
if ( ASSETCHAINS_PRIVATE != 0 )
{
fprintf(stderr,"private chain nValue %.8f iscoinbase.%d\n",(double)txout.nValue/COIN,iscoinbase);
if ( txout.nValue > 0 && iscoinbase == 0 )
if ( (txout.nValue > 0 && iscoinbase == 0) || tx.GetJoinSplitValueOut() > 0 )
return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain");
}
nValueOut += txout.nValue;