log if no invoice has no routing hints

This commit is contained in:
SomberNight 2018-10-17 17:32:58 +02:00
parent 8ed199b87a
commit 66cfcd9feb
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -315,6 +315,9 @@ class LNWorker(PrintError):
RHASH = sha256(payment_preimage)
amount_btc = amount_sat/Decimal(COIN) if amount_sat else None
routing_hints = self._calc_routing_hints_for_invoice(amount_sat)
if not routing_hints:
self.print_error("Warning. No routing hints added to invoice. "
"Other clients will likely not be able to send to us.")
pay_req = lnencode(LnAddr(RHASH, amount_btc, tags=[('d', message)]+routing_hints),
self.node_keypair.privkey)
self.invoices[bh2u(payment_preimage)] = pay_req