-ac_private

This commit is contained in:
jl777
2018-07-02 07:09:29 -11:00
parent 8bcd895c73
commit 36f9e6d6d5
3 changed files with 8 additions and 2 deletions

View File

@@ -1090,6 +1090,7 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
// Check for negative or overflow output values
CAmount nValueOut = 0;
int32_t iscoinbase = tx.IsCoinBase();
BOOST_FOREACH(const CTxOut& txout, tx.vout)
{
if (txout.nValue < 0)
@@ -1100,6 +1101,10 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
fprintf(stderr,"%.8f > max %.8f\n",(double)txout.nValue/COIN,(double)MAX_MONEY/COIN);
return state.DoS(100, error("CheckTransaction(): txout.nValue too high"),REJECT_INVALID, "bad-txns-vout-toolarge");
}
if ( txout.nValue > 0 && ASSETCHAINS_PRIVATE != 0 && iscoinbase == 0 )
{
return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain");
}
nValueOut += txout.nValue;
if (!MoneyRange(nValueOut))
return state.DoS(100, error("CheckTransaction(): txout total out of range"),
@@ -1742,7 +1747,7 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex,bool checkPOW)
extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN];
extern uint32_t ASSETCHAINS_MAGIC;
extern uint64_t ASSETCHAINS_STAKED,ASSETCHAINS_ENDSUBSIDY,ASSETCHAINS_REWARD,ASSETCHAINS_HALVING,ASSETCHAINS_LINEAR,ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY;
extern uint8_t ASSETCHAINS_PUBLIC;
extern uint8_t ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE;
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{