mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge #14227: integer division instead of implicit double conversion
be54f42e5f309ff332d74828ae294636d77fb8ea use integer division instead of double conversion and multiplication for computing amounts (Arvid Norberg) Pull request description: use integer division instead of double conversion and multiplication for computing amounts. This will most likely generate identical code. My main argument in favour of this change is one of purity, that we should not rely on implicit conversion from `CAmount` -> `double` and back again. Today this implicit conversion can happen because `CAmount` is just a typedef to `int64_t`. However, I envision a future where `CAmount` is a proper type that does not allow suspicious implicit conversions like these. Tree-SHA512: a70966623ac6e82410ac94d26cf44e2b7b7a4dbaa514d68ae1f0369aaee1bc2851d05a5e365291b005fe0941428e6139dc62bcfdd0b2f66720706fefe0eb92f1 # Conflicts: # src/validation.h
This commit is contained in:
parent
2b379b0148
commit
0cd799addf
@ -55,9 +55,9 @@ static const bool DEFAULT_WHITELISTFORCERELAY = true;
|
||||
/** Default for -minrelaytxfee, minimum relay fee for transactions */
|
||||
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
|
||||
//! -maxtxfee default
|
||||
static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
|
||||
static const CAmount DEFAULT_TRANSACTION_MAXFEE = COIN / 10;
|
||||
//! Discourage users to set fees higher than this amount (in duffs) per kB
|
||||
static const CAmount HIGH_TX_FEE_PER_KB = 0.01 * COIN;
|
||||
static const CAmount HIGH_TX_FEE_PER_KB = COIN / 100;
|
||||
//! -maxtxfee will warn if called with a higher fee than this amount (in duffs)
|
||||
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
|
||||
/** Default for -limitancestorcount, max number of in-mempool ancestors */
|
||||
|
Loading…
Reference in New Issue
Block a user