mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
multi: make sure CPFP won't exceed max allowed fee rate
This commit updates the `fee()` method in `weightEstimator` to make sure when doing CPFP we are not exceeding the max allowed fee rate. In order to use the max fee rate, we need to modify several methods to pass the configured value to the estimator.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
42ff52bbfb
commit
24fa35ec80
@@ -297,7 +297,7 @@ func TestCraftSweepAllTxCoinSelectFail(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
_, err := CraftSweepAllTx(
|
||||
0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
||||
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
||||
nil, 0,
|
||||
)
|
||||
|
||||
@@ -323,7 +323,7 @@ func TestCraftSweepAllTxUnknownWitnessType(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
_, err := CraftSweepAllTx(
|
||||
0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
||||
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
||||
nil, 0,
|
||||
)
|
||||
|
||||
@@ -358,7 +358,7 @@ func TestCraftSweepAllTx(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
sweepPkg, err := CraftSweepAllTx(
|
||||
0, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
|
||||
0, 0, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
|
||||
utxoLocker, feeEstimator, signer, 0,
|
||||
)
|
||||
require.NoError(t, err, "unable to make sweep tx")
|
||||
|
Reference in New Issue
Block a user