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
2019-07-11 13:14:35 +02:00
parent 98274f63dc
commit 452ee6aad4
3 changed files with 57 additions and 36 deletions

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 {