diff options
| author | Ross Nicoll <[email protected]> | 2021-08-05 22:21:53 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-05 22:21:53 +0100 |
| commit | 5db95e5a5f48eb76601946ea670ee3b2a33e2a4b (patch) | |
| tree | 601ebf9d1837710dffdb5ff9b96e8acd903a4a9a /src/policy | |
| parent | Merge pull request #2415 from rnicoll/1.14.4-rbf-fee (diff) | |
| parent | [fees] Express policies in COIN instead of Koinu (diff) | |
| download | discoin-5db95e5a5f48eb76601946ea670ee3b2a33e2a4b.tar.xz discoin-5db95e5a5f48eb76601946ea670ee3b2a33e2a4b.zip | |
Merge pull request #2348 from patricklodder/1.14-cfg-dust-limit
[fees] introduce configurable hard dust limit
Diffstat (limited to 'src/policy')
| -rw-r--r-- | src/policy/policy.cpp | 1 | ||||
| -rw-r--r-- | src/policy/policy.h | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index ec398f662..7b2b23964 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -209,6 +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; int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost) { diff --git a/src/policy/policy.h b/src/policy/policy.h index a7fc8b78e..5380f7b5b 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -45,7 +45,14 @@ 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 = 1000; +static const unsigned int 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; + /** * Standard script verification flags that standard transactions will comply * with. However scripts violating these flags may still be present in valid @@ -96,6 +103,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) extern CFeeRate incrementalRelayFee; extern CFeeRate dustRelayFee; extern unsigned int nBytesPerSigOp; +extern unsigned int nDustLimit; /** Compute the virtual transaction size (weight reinterpreted as bytes). */ int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost); |