mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
htlcswitch: print rhash in error messages of mockInvoiceRegistry
This commit is contained in:
parent
dbf6a511fc
commit
795b5559f0
1 changed files with 3 additions and 2 deletions
|
@ -473,7 +473,7 @@ func (i *mockInvoiceRegistry) LookupInvoice(rHash chainhash.Hash) (channeldb.Inv
|
|||
|
||||
invoice, ok := i.invoices[rHash]
|
||||
if !ok {
|
||||
return channeldb.Invoice{}, errors.New("can't find mock invoice")
|
||||
return channeldb.Invoice{}, fmt.Errorf("can't find mock invoice: %x", rHash[:])
|
||||
}
|
||||
|
||||
return invoice, nil
|
||||
|
@ -485,7 +485,7 @@ func (i *mockInvoiceRegistry) SettleInvoice(rhash chainhash.Hash) error {
|
|||
|
||||
invoice, ok := i.invoices[rhash]
|
||||
if !ok {
|
||||
return errors.New("can't find mock invoice")
|
||||
return fmt.Errorf("can't find mock invoice: %x", rhash[:])
|
||||
}
|
||||
|
||||
invoice.Terms.Settled = true
|
||||
|
@ -500,6 +500,7 @@ func (i *mockInvoiceRegistry) AddInvoice(invoice channeldb.Invoice) error {
|
|||
|
||||
rhash := fastsha256.Sum256(invoice.Terms.PaymentPreimage[:])
|
||||
i.invoices[chainhash.Hash(rhash)] = invoice
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue