mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
chainfee: change min conf target to be 1
This commit changes the minBlockTarget used by the WebAPIEstimator to be 1, inline with the bitcoind's accepted min conf target.
This commit is contained in:
parent
5f0561fdbc
commit
1abc5f8b00
@ -34,6 +34,6 @@ func TestFeeService(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(
|
||||
t, "{\"fee_by_block_target\":{\"2\":20000}}", string(body),
|
||||
t, "{\"fee_by_block_target\":{\"1\":20000}}", string(body),
|
||||
)
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ const (
|
||||
// minBlockTarget is the lowest number of blocks confirmations that
|
||||
// a WebAPIEstimator will cache fees for. Requesting an estimate for
|
||||
// less than this will result in an error.
|
||||
minBlockTarget uint32 = 2
|
||||
minBlockTarget uint32 = 1
|
||||
|
||||
// minFeeUpdateTimeout represents the minimum interval in which a
|
||||
// WebAPIEstimator will request fresh fees from its API.
|
||||
|
@ -172,7 +172,7 @@ func TestWebAPIFeeEstimator(t *testing.T) {
|
||||
est uint32
|
||||
err string
|
||||
}{
|
||||
{"target_below_min", 1, 12345, 12345, "too low, minimum"},
|
||||
{"target_below_min", 0, 12345, 12345, "too low, minimum"},
|
||||
{"target_w_too-low_fee", 10, 42, feeFloor, ""},
|
||||
{"API-omitted_target", 2, 0, 0, "web API does not include"},
|
||||
{"valid_target", 20, 54321, 54321, ""},
|
||||
|
Loading…
Reference in New Issue
Block a user