shorten and ignore cln.py
This commit is contained in:
parent
f766f9b2c3
commit
234b508368
|
@ -91,17 +91,12 @@ def decode(pr: str) -> Invoice:
|
|||
elif tag == "r":
|
||||
s = bitstring.ConstBitStream(tagdata)
|
||||
while s.pos + 264 + 64 + 32 + 32 + 16 < s.len:
|
||||
pubkey = s.read(264) # type: ignore
|
||||
short_channel_id = s.read(64) # type: ignore
|
||||
base_fee_msat = s.read(32) # type: ignore
|
||||
ppm_fee = s.read(32) # type: ignore
|
||||
cltv = s.read(16) # type: ignore
|
||||
route = Route(
|
||||
pubkey=pubkey.tobytes().hex(),
|
||||
short_channel_id=_readable_scid(short_channel_id.intbe),
|
||||
base_fee_msat=base_fee_msat.intbe,
|
||||
ppm_fee=ppm_fee.intbe,
|
||||
cltv=cltv.intbe,
|
||||
pubkey=s.read(264).tobytes().hex(), # type: ignore
|
||||
short_channel_id=_readable_scid(s.read(64).intbe), # type: ignore
|
||||
base_fee_msat=s.read(32).intbe, # type: ignore
|
||||
ppm_fee=s.read(32).intbe, # type: ignore
|
||||
cltv=s.read(16).intbe, # type: ignore
|
||||
)
|
||||
invoice.route_hints.append(route)
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ class Database(Compat):
|
|||
async def connect(self):
|
||||
await self.lock.acquire()
|
||||
try:
|
||||
async with self.engine.connect() as conn:
|
||||
async with self.engine.connect() as conn: # type: ignore
|
||||
async with conn.begin() as txn:
|
||||
wconn = Connection(conn, txn, self.type, self.name, self.schema)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# type: ignore
|
||||
try:
|
||||
from pyln.client import LightningRpc, RpcError # type: ignore
|
||||
except ImportError: # pragma: nocover
|
||||
|
|
Loading…
Reference in New Issue
Block a user