1
0

lnchannel: make AbstractChannel inherit ABC

and add some type annotations, clean up method signatures
This commit is contained in:
SomberNight
2020-04-13 15:57:53 +02:00
parent 821431a239
commit 8e8ab775eb
6 changed files with 134 additions and 71 deletions

View File

@@ -21,7 +21,7 @@ from .simple_config import SimpleConfig
from .logging import get_logger, Logger
if TYPE_CHECKING:
from .lnchannel import Channel
from .lnchannel import Channel, AbstractChannel
_logger = get_logger(__name__)
@@ -169,7 +169,7 @@ def create_sweeptx_for_their_revoked_htlc(chan: 'Channel', ctx: Transaction, htl
def create_sweeptxs_for_our_ctx(*, chan: 'Channel', ctx: Transaction,
def create_sweeptxs_for_our_ctx(*, chan: 'AbstractChannel', ctx: Transaction,
sweep_address: str) -> Optional[Dict[str, SweepInfo]]:
"""Handle the case where we force close unilaterally with our latest ctx.
Construct sweep txns for 'to_local', and for all HTLCs (2 txns each).