1
0

more type annotations in core lib

This commit is contained in:
SomberNight
2018-10-22 16:41:25 +02:00
parent 6958c0ccc3
commit 81cc20039e
14 changed files with 90 additions and 49 deletions

View File

@@ -22,7 +22,7 @@
# SOFTWARE.
import asyncio
from typing import Sequence, Optional
from typing import Sequence, Optional, TYPE_CHECKING
import aiorpcx
@@ -33,6 +33,10 @@ from .blockchain import hash_header
from .interface import GracefulDisconnect
from . import constants
if TYPE_CHECKING:
from .network import Network
from .address_synchronizer import AddressSynchronizer
class MerkleVerificationFailure(Exception): pass
class MissingBlockHeader(MerkleVerificationFailure): pass
@@ -43,7 +47,7 @@ class InnerNodeOfSpvProofIsValidTx(MerkleVerificationFailure): pass
class SPV(NetworkJobOnDefaultServer):
""" Simple Payment Verification """
def __init__(self, network, wallet):
def __init__(self, network: 'Network', wallet: 'AddressSynchronizer'):
self.wallet = wallet
NetworkJobOnDefaultServer.__init__(self, network)