-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce a minimum fee rate #530
Conversation
@@ -36,6 +36,8 @@ eclair { | |||
} | |||
} | |||
|
|||
min-feerate = 1 // minimum feerate in satoshis per byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to make this configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is safer, otherwise if the minimum relay fee goes up in the bitcoin network we may end up with tx that cannot even be relayed
@@ -129,7 +129,16 @@ class Setup(datadir: File, overrideDefaults: Config = ConfigFactory.empty(), act | |||
val zmqConnected = Promise[Boolean]() | |||
val tcpBound = Promise[Unit]() | |||
|
|||
val defaultFeerates = FeeratesPerByte(block_1 = config.getLong("default-feerates.delay-blocks.1"), blocks_2 = config.getLong("default-feerates.delay-blocks.2"), blocks_6 = config.getLong("default-feerates.delay-blocks.6"), blocks_12 = config.getLong("default-feerates.delay-blocks.12"), blocks_36 = config.getLong("default-feerates.delay-blocks.36"), blocks_72 = config.getLong("default-feerates.delay-blocks.72")) | |||
val minFeerate = config.getLong("min-feerate") | |||
assert(minFeerate > 0, s"minimum fee rate cannnot be zero") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this requirement in the FeeratesPerKw.apply()
method
0894770
to
f5a7e6a
Compare
Make sure that our fee rate is always above a minimum value, set by default at 2 satoshi/byte
Same value as bitcoin core's minimum relay fee
and require that `FeeratesPerByte` and `FeeratesPerKw` be always > 0
Make sure that our fee rate is always above a minimum value, set by default at 1 satoshi/byte