static ring size 22 from v9

This commit is contained in:
wowario 2018-09-17 00:18:27 +03:00
parent bc48be0cdd
commit ec5530a86a
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111
2 changed files with 4 additions and 4 deletions

View file

@ -138,12 +138,12 @@
#define THREAD_STACK_SIZE 5 * 1024 * 1024 #define THREAD_STACK_SIZE 5 * 1024 * 1024
#define DEFAULT_MIXIN 9 // ring size 10 #define DEFAULT_MIXIN 21 // ring size 22
#define HF_VERSION_DYNAMIC_FEE 4 #define HF_VERSION_DYNAMIC_FEE 4
#define HF_VERSION_MIN_MIXIN_4 6 #define HF_VERSION_MIN_MIXIN_4 6
#define HF_VERSION_MIN_MIXIN_7 7 #define HF_VERSION_MIN_MIXIN_7 7
#define HF_VERSION_MIN_MIXIN_9 9 #define HF_VERSION_MIN_MIXIN_21 9
#define HF_VERSION_ENFORCE_RCT 6 #define HF_VERSION_ENFORCE_RCT 6
#define PER_KB_FEE_QUANTIZATION_DECIMALS 8 #define PER_KB_FEE_QUANTIZATION_DECIMALS 8

View file

@ -2623,7 +2623,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
{ {
size_t n_unmixable = 0, n_mixable = 0; size_t n_unmixable = 0, n_mixable = 0;
size_t mixin = std::numeric_limits<size_t>::max(); size_t mixin = std::numeric_limits<size_t>::max();
const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_9 ? 9 : hf_version >= HF_VERSION_MIN_MIXIN_7 ? 7 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2; const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_21 ? 21 : hf_version >= HF_VERSION_MIN_MIXIN_7 ? 7 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2;
for (const auto& txin : tx.vin) for (const auto& txin : tx.vin)
{ {
// non txin_to_key inputs will be rejected below // non txin_to_key inputs will be rejected below
@ -2669,7 +2669,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
} }
// from v9, all transactions must have the same ring size // from v9, all transactions must have the same ring size
if (hf_version >= HF_VERSION_MIN_MIXIN_9) if (hf_version >= HF_VERSION_MIN_MIXIN_21)
{ {
if (mixin != min_mixin) if (mixin != min_mixin)
{ {