fundingmanager+server: define MaxPendingChans. RejectPush in funding config

This commit makes the funding manager access the MaxPendingChannels and
RejectPush values from the fundingConfig instead of the global config
struct.

Done to avoid sharing state between tests.
This commit is contained in:
Johan T. Halseth committed 2019-07-18 00:33:14 +02:00
1 parent 98274f63dc
commit 452ee6aad4
3 files changed
+57 -36

No files matched your search

+2
View File
@@ -1051,6 +1051,8 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
ZombieSweeperInterval: 1 * time.Minute,
ReservationTimeout: 10 * time.Minute,
MinChanSize: btcutil.Amount(cfg.MinChanSize),
MaxPendingChannels: cfg.MaxPendingChannels,
RejectPush: cfg.RejectPush,
NotifyOpenChannelEvent: s.channelNotifier.NotifyOpenChannelEvent,
})
if err != nil {