diff options
| author | Patrick Lodder <[email protected]> | 2021-06-27 00:37:10 +0200 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2021-08-05 18:24:17 +0200 |
| commit | 4c46af04830cec3da6ecfbf677ef3d826a5892e6 (patch) | |
| tree | 8e2c6490458c57ff690788195b298cc4edd07891 /src/policy | |
| parent | Merge pull request #2415 from rnicoll/1.14.4-rbf-fee (diff) | |
| download | discoin-4c46af04830cec3da6ecfbf677ef3d826a5892e6.tar.xz discoin-4c46af04830cec3da6ecfbf677ef3d826a5892e6.zip | |
[fees] introduce configurable hard dust limit
Co-authored-by: Ross Nicoll <[email protected]>
Diffstat (limited to 'src/policy')
| -rw-r--r-- | src/policy/policy.cpp | 1 | ||||
| -rw-r--r-- | src/policy/policy.h | 8 |
2 files changed, 9 insertions, 0 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..be34b9156 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -47,6 +47,13 @@ static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600; * outputs below the new threshold */ static const unsigned int DUST_RELAY_TX_FEE = 1000; /** + * 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 = 100000000; + +/** * Standard script verification flags that standard transactions will comply * with. However scripts violating these flags may still be present in valid * blocks and we must accept those blocks. @@ -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); |