(trivial) just add some TODOs
This commit is contained in:
@@ -737,7 +737,8 @@ class ChannelDB(SqlDB):
|
||||
self._channels_for_node[channel_info.node1_id].add(channel_info.short_channel_id)
|
||||
self._channels_for_node[channel_info.node2_id].add(channel_info.short_channel_id)
|
||||
self._update_num_policies_for_chan(channel_info.short_channel_id)
|
||||
self.logger.info(f'load data {len(self._channels)} {len(self._policies)} {len(self._channels_for_node)}')
|
||||
self.logger.info(f'data loaded. {len(self._channels)} chans. {len(self._policies)} policies. '
|
||||
f'{len(self._channels_for_node)} nodes.')
|
||||
self.update_counts()
|
||||
(nchans_with_0p, nchans_with_1p, nchans_with_2p) = self.get_num_channels_partitioned_by_policy_count()
|
||||
self.logger.info(f'num_channels_partitioned_by_policy_count. '
|
||||
|
||||
@@ -1574,6 +1574,8 @@ class Peer(Logger):
|
||||
# TODO: we should check that all trampoline_onions are the same
|
||||
return None, processed_onion.trampoline_onion_packet
|
||||
|
||||
# TODO don't accept payments twice for same invoice
|
||||
# TODO check invoice expiry
|
||||
info = self.lnworker.get_payment_info(htlc.payment_hash)
|
||||
if info is None:
|
||||
log_fail_reason(f"no payment_info found for RHASH {htlc.payment_hash.hex()}")
|
||||
|
||||
@@ -1210,7 +1210,7 @@ class LNWallet(LNWorker):
|
||||
failure_msg = htlc_log.failure_msg
|
||||
code, data = failure_msg.code, failure_msg.data
|
||||
self.logger.info(f"UPDATE_FAIL_HTLC. code={repr(code)}. "
|
||||
f"decoded_data={failure_msg.decode_data()}. data={data.hex()}")
|
||||
f"decoded_data={failure_msg.decode_data()}. data={data.hex()!r}")
|
||||
self.logger.info(f"error reported by {bh2u(route[sender_idx].node_id)}")
|
||||
if code == OnionFailureCode.MPP_TIMEOUT:
|
||||
raise PaymentFailure(failure_msg.code_name())
|
||||
@@ -1274,6 +1274,8 @@ class LNWallet(LNWorker):
|
||||
sender_idx: int,
|
||||
failure_msg: OnionRoutingFailure) -> None:
|
||||
code, data = failure_msg.code, failure_msg.data
|
||||
# TODO can we use lnmsg.OnionWireSerializer here?
|
||||
# TODO update onion_wire.csv
|
||||
# handle some specific error codes
|
||||
failure_codes = {
|
||||
OnionFailureCode.TEMPORARY_CHANNEL_FAILURE: 0,
|
||||
|
||||
Reference in New Issue
Block a user