mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 08:31:52 +03:00
Merge branch 'datalayer-sim' into atari-merge_datalayer_sim_779e5fd690cb6bcd3936b348708ea72a6fa236b4
This commit is contained in:
commit
c56ef66aaa
@ -163,6 +163,7 @@ def configure(
|
||||
config["ui"]["selected_network"] = net
|
||||
config["introducer"]["selected_network"] = net
|
||||
config["wallet"]["selected_network"] = net
|
||||
config["data_layer"]["selected_network"] = net
|
||||
|
||||
if "seeder" in config:
|
||||
config["seeder"]["port"] = int(mainnet_port)
|
||||
|
@ -311,13 +311,16 @@ async def start_rpc_server(
|
||||
root_path: Path,
|
||||
net_config,
|
||||
connect_to_daemon=True,
|
||||
max_request_body_size=None,
|
||||
):
|
||||
"""
|
||||
Starts an HTTP server with the following RPC methods, to be used by local clients to
|
||||
query the node.
|
||||
"""
|
||||
try:
|
||||
app = web.Application()
|
||||
if max_request_body_size is None:
|
||||
max_request_body_size = 1024 ** 2
|
||||
app = web.Application(client_max_size=max_request_body_size)
|
||||
rpc_server = RpcServer(rpc_api, rpc_api.service_name, stop_cb, root_path, net_config)
|
||||
rpc_server.rpc_api.service._set_state_changed_callback(rpc_server.state_changed)
|
||||
app.add_routes([web.post(route, wrap_http_handler(func)) for (route, func) in rpc_server.get_routes().items()])
|
||||
|
@ -42,6 +42,7 @@ def service_kwargs_for_data_layer(
|
||||
advertised_port=dl_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
network_id=network_id,
|
||||
max_request_body_size=dl_config.get("rpc_server_max_request_body_size", 26214400),
|
||||
)
|
||||
|
||||
port = dl_config.get("port")
|
||||
|
@ -54,6 +54,7 @@ class Service:
|
||||
connect_to_daemon=True,
|
||||
running_new_process=True,
|
||||
service_name_prefix="",
|
||||
max_request_body_size=None,
|
||||
) -> None:
|
||||
self.root_path = root_path
|
||||
self.config = load_config(root_path, "config.yaml")
|
||||
@ -67,6 +68,7 @@ class Service:
|
||||
self._rpc_task: Optional[asyncio.Task] = None
|
||||
self._rpc_close_task: Optional[asyncio.Task] = None
|
||||
self._network_id: str = network_id
|
||||
self.max_request_body_size = max_request_body_size
|
||||
self._running_new_process = running_new_process
|
||||
|
||||
# when we start this service as a component of an existing process,
|
||||
@ -179,6 +181,7 @@ class Service:
|
||||
self.root_path,
|
||||
self.config,
|
||||
self._connect_to_daemon,
|
||||
max_request_body_size=self.max_request_body_size,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -566,6 +566,7 @@ data_layer:
|
||||
start_rpc_server: True
|
||||
# TODO: what considerations are there in choosing this?
|
||||
rpc_port: 8562
|
||||
rpc_server_max_request_body_size: 26214400
|
||||
fee: 1000000000
|
||||
logging: *logging
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user