1
0

network: tighten checks of server responses for type/sanity

This commit is contained in:
SomberNight
2020-10-16 19:30:42 +02:00
parent c70484455c
commit c5da22a9dd
5 changed files with 174 additions and 54 deletions

View File

@@ -5,7 +5,7 @@ import os
import stat
import ssl
from decimal import Decimal
from typing import Union, Optional, Dict
from typing import Union, Optional, Dict, Sequence, Tuple
from numbers import Real
from copy import deepcopy
@@ -65,7 +65,7 @@ class SimpleConfig(Logger):
# a thread-safe way.
self.lock = threading.RLock()
self.mempool_fees = {} # type: Dict[Union[float, int], int]
self.mempool_fees = [] # type: Sequence[Tuple[Union[float, int], int]]
self.fee_estimates = {}
self.fee_estimates_last_updated = {}
self.last_time_fee_estimates_requested = 0 # zero ensures immediate fees