diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-07-17 06:52:09 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-07-17 07:10:03 -0400 |
commit | b1385852ef2ba45fd6926d75497646debf79e686 (patch) | |
tree | b752ab5590661f6a81efbdacb26a67475c42de2c /src/policy/policy.h | |
parent | 91edda8f3c81ba5a69f44485f20d74f85ec9cee1 (diff) |
Remove factor of 3 from definition of dust.
This redefines dust to be the value of an output such that it would
cost that value in fees to (create and) spend the output at the dust
relay rate. The previous definition was that it would cost 1/3 of the
value. The default dust relay rate is correspondingly increased to
3000 sat/kB so the actual default dust output value of 546 satoshis
for a non-segwit output remains unchanged. This commit is a refactor
only unless a dustrelayfee is passed on the commandline in which case
that number now needs to be increased by a factor of 3 to get the same
behavior. -dustrelayfee is a hidden command line option.
Note: It's not exactly a refactor due to edge case changes in rounding
as evidenced by the required change to the unit test.
Diffstat (limited to 'src/policy/policy.h')
-rw-r--r-- | src/policy/policy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/policy/policy.h b/src/policy/policy.h index 2c2ea9d5b8..c06820f84e 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -40,12 +40,12 @@ static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS = 100; static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80; /** The maximum size of a standard witnessScript */ static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600; -/** Min feerate for defining dust. Historically this has been the same as the +/** Min feerate for defining dust. Historically this has been based on the * minRelayTxFee, however changing the dust limit changes which transactions are * 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 = 3000; /** * Standard script verification flags that standard transactions will comply * with. However scripts violating these flags may still be present in valid |