channeldb: add subscription to control tower

Allows other sub-systems to subscribe to payment success and fail
events.
This commit is contained in:
Joost Jager
2019-04-30 13:24:37 +02:00
parent 87d3207baf
commit eb2647e8fc
5 changed files with 512 additions and 23 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"sync"
"github.com/go-errors/errors"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/lntypes"
@@ -284,3 +285,9 @@ func (m *mockControlTower) FetchInFlightPayments() (
return fl, nil
}
func (m *mockControlTower) SubscribePayment(paymentHash lntypes.Hash) (
bool, chan PaymentResult, error) {
return false, nil, errors.New("not implemented")
}