Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit the number of pending un-funded inbound channel
Because we store some (not large, but not zero) state per-peer, it's useful to limit the number of peers we have connected, at least with some buffer. Much more importantly, each channel has a relatively large cost, especially around the `ChannelMonitor`s we have to build for each. Thus, here, we limit the number of channels per-peer which aren't (yet) on-chain, as well as limit the number of (inbound) peers which don't have a (funded-on-chain) channel. Fixes #1889
- Loading branch information