Remove unused cache field
This commit is contained in:
parent
c436c6480e
commit
e9d71f62bf
8
cli.py
8
cli.py
@ -37,10 +37,9 @@ def coro(f):
|
||||
@cli.command()
|
||||
@click.argument("block_number", type=int)
|
||||
@click.option("--rpc", default=lambda: os.environ.get(RPC_URL_ENV, ""))
|
||||
@click.option("--cache/--no-cache", default=True)
|
||||
@coro
|
||||
async def inspect_block_command(block_number: int, rpc: str, cache: bool):
|
||||
inspector = MEVInspector(rpc=rpc, cache=cache)
|
||||
async def inspect_block_command(block_number: int, rpc: str):
|
||||
inspector = MEVInspector(rpc=rpc)
|
||||
await inspector.inspect_single_block(block=block_number)
|
||||
|
||||
|
||||
@ -58,7 +57,6 @@ async def fetch_block_command(block_number: int, rpc: str):
|
||||
@click.argument("after_block", type=int)
|
||||
@click.argument("before_block", type=int)
|
||||
@click.option("--rpc", default=lambda: os.environ.get(RPC_URL_ENV, ""))
|
||||
@click.option("--cache/--no-cache", default=True)
|
||||
@click.option(
|
||||
"--max-concurrency",
|
||||
type=int,
|
||||
@ -73,13 +71,11 @@ async def inspect_many_blocks_command(
|
||||
after_block: int,
|
||||
before_block: int,
|
||||
rpc: str,
|
||||
cache: bool,
|
||||
max_concurrency: int,
|
||||
request_timeout: int,
|
||||
):
|
||||
inspector = MEVInspector(
|
||||
rpc=rpc,
|
||||
cache=cache,
|
||||
max_concurrency=max_concurrency,
|
||||
request_timeout=request_timeout,
|
||||
)
|
||||
|
@ -21,13 +21,9 @@ class MEVInspector:
|
||||
def __init__(
|
||||
self,
|
||||
rpc: str,
|
||||
cache: bool = False,
|
||||
max_concurrency: int = 1,
|
||||
request_timeout: int = 300,
|
||||
):
|
||||
if not cache:
|
||||
logger.info("Skipping cache")
|
||||
|
||||
self.inspect_db_session = get_inspect_session()
|
||||
self.trace_db_session = get_trace_session()
|
||||
self.base_provider = get_base_provider(rpc, request_timeout=request_timeout)
|
||||
|
Loading…
x
Reference in New Issue
Block a user