mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-22 15:44:20 +01:00
chore: some cleanups and minor fixes
This removes debug output and corrects some code nits that have been introduced by the big CI restoration PR #418
This commit is contained in:
committed by
Christian Decker
parent
7f8d4356ed
commit
f3d741e7af
@@ -54,9 +54,10 @@ class Payment(object):
|
||||
def serialize_payload(n, blockheight):
|
||||
block, tx, out = n['channel'].split('x')
|
||||
scid = int(block) << 40 | int(tx) << 16 | int(out)
|
||||
|
||||
def minint(i):
|
||||
if i < 2**8:
|
||||
return struct.pack("!b", i)
|
||||
return struct.pack("!B", i)
|
||||
elif i < 2**16:
|
||||
return struct.pack('!H', i)
|
||||
elif i < 2**32:
|
||||
@@ -213,9 +214,6 @@ def on_htlc_accepted(onion, htlc, plugin, **kwargs):
|
||||
msg.verified = sigcheck['verified']
|
||||
|
||||
preimage = payload.get(TLV_KEYSEND_PREIMAGE)
|
||||
print("YYY")
|
||||
print(htlc)
|
||||
print(onion)
|
||||
if preimage is not None:
|
||||
msg.payment = Payment(preimage.value, htlc['amount_msat'])
|
||||
res = {
|
||||
@@ -226,9 +224,6 @@ def on_htlc_accepted(onion, htlc, plugin, **kwargs):
|
||||
res = {'result': 'continue'}
|
||||
|
||||
plugin.messages.append(msg)
|
||||
print("Delivering message to {c} waiters".format(
|
||||
c=len(plugin.receive_waiters)
|
||||
))
|
||||
for r in plugin.receive_waiters:
|
||||
m = msg.to_dict()
|
||||
m['total_messages'] = len(plugin.messages)
|
||||
|
||||
Reference in New Issue
Block a user