Test
This commit is contained in:
@@ -1539,7 +1539,7 @@ int64_t komodo_newcoins(int64_t *zfundsp,int32_t nHeight,CBlock *pblock)
|
|||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
{
|
{
|
||||||
CTransaction vintx,&tx = pblock->vtx[i];
|
CTransaction vintx,&tx = pblock->vtx[i];
|
||||||
zfunds += (tx.GetJoinSplitValueIn() - tx.GetJoinSplitValueOut());
|
zfunds += (tx.GetJoinSplitValueOut() - tx.GetJoinSplitValueIn());
|
||||||
if ( (m= tx.vin.size()) > 0 )
|
if ( (m= tx.vin.size()) > 0 )
|
||||||
{
|
{
|
||||||
for (j=0; j<m; j++)
|
for (j=0; j<m; j++)
|
||||||
@@ -1597,7 +1597,7 @@ int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height)
|
|||||||
}
|
}
|
||||||
supply += pindex->newcoins;
|
supply += pindex->newcoins;
|
||||||
zfunds += pindex->zfunds;
|
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;
|
pindex = pindex->pprev;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1104,7 +1104,7 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
|
|||||||
if ( ASSETCHAINS_PRIVATE != 0 )
|
if ( ASSETCHAINS_PRIVATE != 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"private chain nValue %.8f iscoinbase.%d\n",(double)txout.nValue/COIN,iscoinbase);
|
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");
|
return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain");
|
||||||
}
|
}
|
||||||
nValueOut += txout.nValue;
|
nValueOut += txout.nValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user