1
0

lnbase: use correct cltv_expiry calculation (use invoice)

This commit is contained in:
Janus
2018-05-22 15:37:27 +02:00
committed by ThomasV
parent eeb027babc
commit 5d375de30e
4 changed files with 17 additions and 16 deletions

View File

@@ -92,3 +92,6 @@ class TestBolt11(unittest.TestCase):
databits.invert(-1)
lnaddr = lndecode(bech32_encode(hrp, bitarray_to_u5(databits)), True)
assert lnaddr.pubkey.serialize() == PUBKEY
def test_min_final_cltv_expiry(self):
self.assertEquals(lndecode("lnsb500u1pdsgyf3pp5nmrqejdsdgs4n9ukgxcp2kcq265yhrxd4k5dyue58rxtp5y83s3qdqqcqzystrggccm9yvkr5yqx83jxll0qjpmgfg9ywmcd8g33msfgmqgyfyvqhku80qmqm8q6v35zvck2y5ccxsz5avtrauz8hgjj3uahppyq20qp6dvwxe", expected_hrp="sb").min_final_cltv_expiry, 144)