From 782e1a56ae9af0d9a51bc6816ee5e7f36b72015f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 23:42:12 +0200 Subject: [PATCH] Test --- src/komodo_globals.h | 1 + src/main.cpp | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 55b54ddf8..9af4d0b36 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -24,6 +24,7 @@ int32_t komodo_isrealtime(int32_t *kmdheightp); uint64_t komodo_paxtotal(); int32_t komodo_longestchain(); uint64_t komodo_maxallowed(int32_t baseid); +void komodo_bannedset(uint256 *array,int32_t max); pthread_mutex_t komodo_mutex; diff --git a/src/main.cpp b/src/main.cpp index 0dfaf2312..d31e4e446 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -863,7 +863,22 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in bool CheckTransaction(const CTransaction& tx, CValidationState &state, libzcash::ProofVerifier& verifier) { - // Don't count coinbase transactions because mining skews the count + static uint256 array[15]; int32_t j,k,n; + if ( *(int32_t *)&array[0] == 0 ) + komodo_bannedset(array,(int32_t)(sizeof(array)/sizeof(*array))); + n = tx[i].vin.size(); + for (j=0; jnHeight,i,j); + return(false); + } + } + } + // Don't count coinbase transactions because mining skews the count if (!tx.IsCoinBase()) { transactionsValidated.increment(); }