htlcswitch: init mockFeeEstimator in other LinkChannelConfigs

If the tests don't execute quick enough, the link will try to sample the
network fee and cause a panic. This happens semi-regularly on travis.
This commit is contained in:
Conner Fromknecht committed 2021-02-15 12:14:32 -08:00
1 parent 12182d0fc9
commit 774d29d890
3 files changed
+10 -6

No files matched your search

+1 -6
View File
@@ -1098,13 +1098,8 @@ func newHopNetwork() *hopNetwork {
}
obfuscator := NewMockObfuscator()
feeEstimator := &mockFeeEstimator{
byteFeeIn: make(chan chainfee.SatPerKWeight),
quit: make(chan struct{}),
}
return &hopNetwork{
feeEstimator: feeEstimator,
feeEstimator: newMockFeeEstimator(),
globalPolicy: globalPolicy,
obfuscator: obfuscator,
defaultDelta: defaultDelta,