channel_db: add TTLs to channel_updates_for_private_channels
eclair sends CHANNEL_DISABLED if its peer is offline. E.g. we might be trying to pay a mobile phone with the app closed. In that case we should not cache the CHANNEL_DISABLED for too long.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
import io
|
||||
import hashlib
|
||||
from typing import Sequence, List, Tuple, NamedTuple, TYPE_CHECKING, Dict, Any, Optional
|
||||
from typing import Sequence, List, Tuple, NamedTuple, TYPE_CHECKING, Dict, Any, Optional, Union
|
||||
from enum import IntEnum
|
||||
|
||||
from . import ecc
|
||||
@@ -356,7 +356,7 @@ class FailedToDecodeOnionError(Exception): pass
|
||||
|
||||
class OnionRoutingFailure(Exception):
|
||||
|
||||
def __init__(self, code: int, data: bytes):
|
||||
def __init__(self, code: Union[int, 'OnionFailureCode'], data: bytes):
|
||||
self.code = code
|
||||
self.data = data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user