-ac_public -> disable z transactions if you want to prevent privacy

This commit is contained in:
jl777
2018-06-28 21:46:16 -11:00
parent 4d0683677d
commit 626179f166
3 changed files with 10 additions and 3 deletions

View File

@@ -1109,6 +1109,11 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
// Ensure that joinsplit values are well-formed
BOOST_FOREACH(const JSDescription& joinsplit, tx.vjoinsplit)
{
if ( ASSETCHAINS_PUBLIC != 0 )
{
return state.DoS(100, error("CheckTransaction(): this is a public chain, no privacy allowed"),
REJECT_INVALID, "bad-txns-acprivacy-chain");
}
if (joinsplit.vpub_old < 0) {
return state.DoS(100, error("CheckTransaction(): joinsplit.vpub_old negative"),
REJECT_INVALID, "bad-txns-vpub_old-negative");
@@ -1737,6 +1742,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;
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{