mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-29 02:24:35 -05:00
* Enable PEP604 Ruff rules * Fix harcoded signature in test * Hack CLVMStreamable test with note to fast follow
32 lines
733 B
Python
32 lines
733 B
Python
from __future__ import annotations
|
|
|
|
import click
|
|
|
|
from chia.cmds.cmd_classes import ChiaCliContext
|
|
|
|
|
|
@click.group("solver", help="Manage your solver")
|
|
def solver_cmd() -> None:
|
|
pass
|
|
|
|
|
|
@solver_cmd.command("get_state", help="Get current solver state")
|
|
@click.option(
|
|
"-sp",
|
|
"--solver-rpc-port",
|
|
help="Set the port where the Solver is hosting the RPC interface. See the rpc_port under solver in config.yaml",
|
|
type=int,
|
|
default=None,
|
|
show_default=True,
|
|
)
|
|
@click.pass_context
|
|
def get_state_cmd(
|
|
ctx: click.Context,
|
|
solver_rpc_port: int | None,
|
|
) -> None:
|
|
import asyncio
|
|
|
|
from chia.cmds.solver_funcs import get_state
|
|
|
|
asyncio.run(get_state(ChiaCliContext.set_default(ctx), solver_rpc_port))
|