kopia lustrzana https://github.com/bugout-dev/moonstream
Fix lint and conformation can set as 0.
rodzic
7a3a949a93
commit
3b0eb01c0c
|
@ -24,7 +24,7 @@ class MoonstreamHTTPException(HTTPException):
|
|||
status_code: int,
|
||||
detail: Any = None,
|
||||
headers: Optional[Dict[str, Any]] = None,
|
||||
internal_error: Exception = None,
|
||||
internal_error: Optional[Exception] = None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
if internal_error is not None:
|
||||
|
|
|
@ -103,7 +103,6 @@ def continuous_crawler(
|
|||
), "min_blocks_batch must be less than max_blocks_batch"
|
||||
assert min_blocks_batch > 0, "min_blocks_batch must be greater than 0"
|
||||
assert max_blocks_batch > 0, "max_blocks_batch must be greater than 0"
|
||||
assert confirmations > 0, "confirmations must be greater than 0"
|
||||
assert min_sleep_time > 0, "min_sleep_time must be greater than 0"
|
||||
assert heartbeat_interval > 0, "heartbeat_interval must be greater than 0"
|
||||
assert (
|
||||
|
@ -124,8 +123,8 @@ def continuous_crawler(
|
|||
network = Network.mumbai
|
||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
||||
network = Network.xdai
|
||||
elif blockchain_type == AvailableBlockchainType.CALDERA:
|
||||
network = Network.caldera
|
||||
elif blockchain_type == AvailableBlockchainType.WYRM:
|
||||
network = Network.wyrm
|
||||
else:
|
||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
||||
|
||||
|
@ -167,6 +166,11 @@ def continuous_crawler(
|
|||
start_block + max_blocks_batch,
|
||||
)
|
||||
|
||||
print(f"start_block: {start_block}, end_block: {end_block}")
|
||||
print(f"web3.eth.blockNumber: {web3.eth.blockNumber}")
|
||||
print(f"confirmations: {confirmations}")
|
||||
print(f"max_blocks_batch: {max_blocks_batch}")
|
||||
|
||||
if start_block + min_blocks_batch > end_block:
|
||||
current_sleep_time += 0.1
|
||||
logger.info(
|
||||
|
|
Ładowanie…
Reference in New Issue