mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-01 11:00:51 +02:00
lnwallet: prevent static fee estimator fees from being modified
Modifying the static fees is not thread safe. In this commit the fees are made immutable.
This commit is contained in:
@ -157,7 +157,7 @@ func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) {
|
||||
dummyDeliveryScript),
|
||||
}
|
||||
|
||||
estimator := lnwallet.StaticFeeEstimator{FeePerKW: 12500}
|
||||
estimator := lnwallet.NewStaticFeeEstimator(12500, 0)
|
||||
feePerKw, err := estimator.EstimateFeePerKW(1)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to query fee estimator: %v", err)
|
||||
@ -447,7 +447,7 @@ func TestPeerChannelClosureFeeNegotiationsInitiator(t *testing.T) {
|
||||
msg: respShutdown,
|
||||
}
|
||||
|
||||
estimator := lnwallet.StaticFeeEstimator{FeePerKW: 12500}
|
||||
estimator := lnwallet.NewStaticFeeEstimator(12500, 0)
|
||||
initiatorIdealFeeRate, err := estimator.EstimateFeePerKW(1)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to query fee estimator: %v", err)
|
||||
|
Reference in New Issue
Block a user