multi: add AddPendingChannel to peer interface

The funding manager has been updated to use `AddPendingChannel`. Note
that we track the pending channel before it's confirmed as the peer may
have a block height in the future(from our view), thus they may start
operating in this channel before we consider it as fully open.

The mocked peers have been updated to implement the new interface method.
This commit is contained in:
yyforyongyu
2023-03-16 21:25:17 +08:00
parent f39c568c94
commit e46bd8e177
6 changed files with 46 additions and 1 deletions

View File

@ -1888,6 +1888,12 @@ func (m *mockPeer) RemoteFeatures() *lnwire.FeatureVector {
return nil
}
func (m *mockPeer) AddPendingChannel(_ lnwire.ChannelID,
_ <-chan struct{}) error {
return nil
}
func newSingleLinkTestHarness(t *testing.T, chanAmt, chanReserve btcutil.Amount) (
ChannelLink, *lnwallet.LightningChannel, chan time.Time, func() error,
func() (*lnwallet.LightningChannel, error), error) {