aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2021-08-09 22:50:31 +0100
committerGitHub <[email protected]>2021-08-09 22:50:31 +0100
commit6150f6717a23e912769f9d8232774fb8e0baee2c (patch)
tree0f30ade43d6280221a52c8db771495c4a3e5d981 /src/policy
parentMerge pull request #2417 from patricklodder/1.14-serialize-getheaders (diff)
parentUse CAmount for constant amounts too (diff)
downloaddiscoin-6150f6717a23e912769f9d8232774fb8e0baee2c.tar.xz
discoin-6150f6717a23e912769f9d8232774fb8e0baee2c.zip
Merge pull request #2439 from rnicoll/1.14.4-dust-limit-type-alt
Use CAmount for amounts
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/policy.cpp2
-rw-r--r--src/policy/policy.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index 7b2b23964..506eb6f17 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -209,7 +209,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
CFeeRate incrementalRelayFee = CFeeRate(DEFAULT_INCREMENTAL_RELAY_FEE);
CFeeRate dustRelayFee = CFeeRate(DUST_RELAY_TX_FEE);
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
-unsigned int nDustLimit = DEFAULT_DUST_LIMIT;
+CAmount nDustLimit = DEFAULT_DUST_LIMIT;
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
{
diff --git a/src/policy/policy.h b/src/policy/policy.h
index 5380f7b5b..2540f373c 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -31,7 +31,7 @@ static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
/** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/
-static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000;
+static const CAmount DEFAULT_INCREMENTAL_RELAY_FEE = 1000;
/** Default for -bytespersigop */
static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20;
/** The maximum number of witness stack items in a standard P2WSH script */
@@ -45,13 +45,13 @@ static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600;
* standard and should be done with care and ideally rarely. It makes sense to
* only increase the dust limit after prior releases were already not creating
* outputs below the new threshold */
-static const unsigned int DUST_RELAY_TX_FEE = COIN / 100000;
+static const CAmount DUST_RELAY_TX_FEE = COIN / 100000;
/**
* Dogecoin: Default dust limit that is evaluated when considering whether a
* transaction output is required to pay additional fee for relay and inclusion
* in blocks. Overridden by -dustlimit
*/
-static const unsigned int DEFAULT_DUST_LIMIT = COIN / 1;
+static const CAmount DEFAULT_DUST_LIMIT = COIN / 1;
/**
* Standard script verification flags that standard transactions will comply
@@ -103,7 +103,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
extern CFeeRate incrementalRelayFee;
extern CFeeRate dustRelayFee;
extern unsigned int nBytesPerSigOp;
-extern unsigned int nDustLimit;
+extern CAmount nDustLimit;
/** Compute the virtual transaction size (weight reinterpreted as bytes). */
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost);