Add support for defining a list of full node peers to connect to (#17369)

This commit is contained in:
Felix Brucker 2024-01-24 01:00:54 +07:00 committed by GitHub
parent 28aace130d
commit 82f3b06051
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,7 @@ from chia.server.outbound_message import NodeType
from chia.server.start_service import RpcInfo, Service, async_run
from chia.types.aliases import FullNodeService
from chia.util.chia_logging import initialize_service_logging
from chia.util.config import load_config, load_config_cli
from chia.util.config import get_unresolved_peer_infos, load_config, load_config_cli
from chia.util.default_root import DEFAULT_ROOT_PATH
from chia.util.ints import uint16
from chia.util.misc import SignalHandlers
@ -61,6 +61,7 @@ async def create_full_node_service(
advertised_port=service_config["port"],
service_name=SERVICE_NAME,
upnp_ports=upnp_list,
connect_peers=get_unresolved_peer_infos(service_config, NodeType.FULL_NODE),
on_connect_callback=full_node.on_connect,
network_id=network_id,
rpc_info=rpc_info,

View File

@ -353,6 +353,8 @@ timelord:
full_node:
# The full node server (if run) will run on this port
port: 8444
# The full node will attempt to connect to these full nodes
full_node_peers: []
# controls the sync-to-disk behavior of the database connection. Can be one of:
# "on" enables syncing to disk, minimizes risk of corrupting the DB in