1
0

small clean-up re max CLTV delta for LN

This commit is contained in:
SomberNight
2020-03-30 01:42:14 +02:00
parent d0a80226ea
commit 90f3b667aa
4 changed files with 8 additions and 5 deletions

View File

@@ -1040,7 +1040,7 @@ class LNWallet(LNWorker):
addr.amount = Decimal(amount_sat) / COIN
if addr.amount is None:
raise InvoiceError(_("Missing amount"))
if addr.get_min_final_cltv_expiry() > 60 * 144:
if addr.get_min_final_cltv_expiry() > lnutil.NBLOCK_CLTV_EXPIRY_TOO_FAR_INTO_FUTURE:
raise InvoiceError("{}\n{}".format(
_("Invoice wants us to risk locking funds for unreasonably long."),
f"min_final_cltv_expiry: {addr.get_min_final_cltv_expiry()}"))