multi: make GetPaymentResult take payment hash

Used for logging in the switch, and when we remove the pending payments,
only the router will have the hash stored across restarts.
This commit is contained in:
Johan T. Halseth committed 2019-06-07 16:53:32 +02:00
1 parent 1febe1a6d5
commit 2dea790b55
7 files changed
+15 -13

No files matched your search

+4 -3
View File
@@ -52,7 +52,8 @@ func (m *mockPaymentAttemptDispatcher) SendHTLC(firstHop lnwire.ShortChannelID,
}
func (m *mockPaymentAttemptDispatcher) GetPaymentResult(paymentID uint64,
_ htlcswitch.ErrorDecrypter) (<-chan *htlcswitch.PaymentResult, error) {
_ lntypes.Hash, _ htlcswitch.ErrorDecrypter) (
<-chan *htlcswitch.PaymentResult, error) {
c := make(chan *htlcswitch.PaymentResult, 1)
res, ok := m.results[paymentID]
@@ -139,8 +140,8 @@ func (m *mockPayer) SendHTLC(_ lnwire.ShortChannelID,
}
func (m *mockPayer) GetPaymentResult(paymentID uint64, _ htlcswitch.ErrorDecrypter) (
<-chan *htlcswitch.PaymentResult, error) {
func (m *mockPayer) GetPaymentResult(paymentID uint64, _ lntypes.Hash,
_ htlcswitch.ErrorDecrypter) (<-chan *htlcswitch.PaymentResult, error) {
select {
case res := <-m.paymentResult: