follow-up eadd1bebb2
This commit is contained in:
@@ -284,7 +284,7 @@ class HTLCManager:
|
|||||||
@with_lock
|
@with_lock
|
||||||
def get_unacked_local_updates(self) -> Dict[int, Sequence[bytes]]:
|
def get_unacked_local_updates(self) -> Dict[int, Sequence[bytes]]:
|
||||||
#return self.log[LOCAL]['unacked_updates']
|
#return self.log[LOCAL]['unacked_updates']
|
||||||
return {int(ctn): [bfh(msg) for msg in messages]
|
return {ctn: [bfh(msg) for msg in messages]
|
||||||
for ctn, messages in self.log[LOCAL]['unacked_updates'].items()}
|
for ctn, messages in self.log[LOCAL]['unacked_updates'].items()}
|
||||||
|
|
||||||
##### Queries re HTLCs:
|
##### Queries re HTLCs:
|
||||||
@@ -340,7 +340,6 @@ class HTLCManager:
|
|||||||
htlc_proposer: HTLCOwner,
|
htlc_proposer: HTLCOwner,
|
||||||
htlc_id: int,
|
htlc_id: int,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
htlc_id = int(htlc_id)
|
|
||||||
if htlc_id >= self.get_next_htlc_id(htlc_proposer):
|
if htlc_id >= self.get_next_htlc_id(htlc_proposer):
|
||||||
return False
|
return False
|
||||||
ctns = self.log[htlc_proposer]['locked_in'][htlc_id]
|
ctns = self.log[htlc_proposer]['locked_in'][htlc_id]
|
||||||
@@ -381,7 +380,6 @@ class HTLCManager:
|
|||||||
htlc_proposer: HTLCOwner,
|
htlc_proposer: HTLCOwner,
|
||||||
htlc_id: int,
|
htlc_id: int,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
htlc_id = int(htlc_id)
|
|
||||||
if htlc_id >= self.get_next_htlc_id(htlc_proposer):
|
if htlc_id >= self.get_next_htlc_id(htlc_proposer):
|
||||||
return False
|
return False
|
||||||
if htlc_id in self.log[htlc_proposer]['settles']:
|
if htlc_id in self.log[htlc_proposer]['settles']:
|
||||||
|
|||||||
@@ -1358,7 +1358,8 @@ class WalletDB(JsonDB):
|
|||||||
elif key == 'data_loss_protect_remote_pcp':
|
elif key == 'data_loss_protect_remote_pcp':
|
||||||
v = dict((k, bfh(x)) for k, x in v.items())
|
v = dict((k, bfh(x)) for k, x in v.items())
|
||||||
# convert htlc_id keys to int
|
# convert htlc_id keys to int
|
||||||
if key in ['adds', 'locked_in', 'settles', 'fails', 'fee_updates', 'buckets']:
|
if key in ['adds', 'locked_in', 'settles', 'fails', 'fee_updates', 'buckets',
|
||||||
|
'unacked_updates', 'unfulfilled_htlcs', 'fail_htlc_reasons', 'onion_keys']:
|
||||||
v = dict((int(k), x) for k, x in v.items())
|
v = dict((int(k), x) for k, x in v.items())
|
||||||
# convert keys to HTLCOwner
|
# convert keys to HTLCOwner
|
||||||
if key == 'log' or (path and path[-1] in ['locked_in', 'fails', 'settles']):
|
if key == 'log' or (path and path[-1] in ['locked_in', 'fails', 'settles']):
|
||||||
|
|||||||
Reference in New Issue
Block a user