routing: add SubscribeAllPayments to control tower

Add a method 'SubscribeAllPayments' to the control tower, in order to be able to
subscribe to any payment, rather than subscribing to a specific payment hash.
This commit is contained in:
Jesse de Wit committed 2022-09-08 10:48:34 +02:00
1 parent 9d04b0c3d9
commit e65f020348
3 files changed
+318 -7

No files matched your search

+13
View File
@@ -557,6 +557,12 @@ func (m *mockControlTowerOld) SubscribePayment(paymentHash lntypes.Hash) (
return nil, errors.New("not implemented")
}
func (m *mockControlTowerOld) SubscribeAllPayments() (
*ControlTowerSubscriber, error) {
return nil, errors.New("not implemented")
}
type mockPaymentAttemptDispatcher struct {
mock.Mock
@@ -774,6 +780,13 @@ func (m *mockControlTower) SubscribePayment(paymentHash lntypes.Hash) (
return args.Get(0).(*ControlTowerSubscriber), args.Error(1)
}
func (m *mockControlTower) SubscribeAllPayments() (
*ControlTowerSubscriber, error) {
args := m.Called()
return args.Get(0).(*ControlTowerSubscriber), args.Error(1)
}
type mockLink struct {
htlcswitch.ChannelLink
bandwidth lnwire.MilliSatoshi