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:
Joost Jager committed 2018-12-18 10:50:05 +01:00
1 parent 423dd8ab9b
commit 91f3df07e4
12 files changed
+41 -32

No files matched your search

+1 -1
View File
@@ -1131,7 +1131,7 @@ func TestHTLCSigNumber(t *testing.T) {
}
// Calculate two values that will be below and above Bob's dust limit.
estimator := &StaticFeeEstimator{FeePerKW: 6000}
estimator := NewStaticFeeEstimator(6000, 0)
feePerKw, err := estimator.EstimateFeePerKW(1)
if err != nil {
t.Fatalf("unable to get fee: %v", err)