constants: add some more type hints
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
import os
|
||||
import json
|
||||
from typing import Sequence, Tuple, Mapping, Type
|
||||
|
||||
from .util import inv_dict, all_subclasses
|
||||
from . import bitcoin
|
||||
@@ -58,6 +59,14 @@ class AbstractNet:
|
||||
BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS: int = 0
|
||||
BIP44_COIN_TYPE: int
|
||||
LN_REALM_BYTE: int
|
||||
DEFAULT_PORTS: Mapping[str, str]
|
||||
DEFAULT_SERVERS: Mapping[str, Mapping[str, str]]
|
||||
CHECKPOINTS: Sequence[Tuple[str, int]]
|
||||
LN_DNS_SEEDS: Sequence[str]
|
||||
XPRV_HEADERS: Mapping[str, int]
|
||||
XPRV_HEADERS_INV: Mapping[int, str]
|
||||
XPUB_HEADERS: Mapping[str, int]
|
||||
XPUB_HEADERS_INV: Mapping[int, str]
|
||||
|
||||
@classmethod
|
||||
def max_checkpoint(cls) -> int:
|
||||
@@ -184,7 +193,7 @@ class BitcoinSignet(BitcoinTestnet):
|
||||
NETS_LIST = tuple(all_subclasses(AbstractNet))
|
||||
|
||||
# don't import net directly, import the module instead (so that net is singleton)
|
||||
net = BitcoinMainnet
|
||||
net = BitcoinMainnet # type: Type[AbstractNet]
|
||||
|
||||
def set_signet():
|
||||
global net
|
||||
|
||||
Reference in New Issue
Block a user