Skip to content

Commit

Permalink
Set unique peer filenames when swapping to/from testnets (#17592)
Browse files Browse the repository at this point in the history
Set unique peer filenames when swapping to testnet
  • Loading branch information
cmmarslender authored Feb 21, 2024
1 parent 7bc2efc commit 1cce93e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chia/cmds/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def configure(
testnet_dns_introducer = "dns-introducer-testnet11.chia.net"
bootstrap_peers = ["testnet11-node-us-west-2.chia.net"]
testnet = "testnet11"
config["full_node"]["peers_file_path"] = "db/peers-testnet11.dat"
config["wallet"]["wallet_peers_file_path"] = "wallet/db/wallet_peers-testnet11.dat"
config["full_node"]["port"] = int(testnet_port)
if config["full_node"]["introducer_peer"] is None:
config["full_node"]["introducer_peer"] = {}
Expand Down Expand Up @@ -152,6 +154,8 @@ def configure(
mainnet_dns_introducer = "dns-introducer.chia.net"
bootstrap_peers = ["node.chia.net"]
net = "mainnet"
config["full_node"]["peers_file_path"] = "db/peers.dat"
config["wallet"]["wallet_peers_file_path"] = "wallet/db/wallet_peers.dat"
config["full_node"]["port"] = int(mainnet_port)
config["full_node"]["introducer_peer"]["port"] = int(mainnet_port)
set_peer_info(config["farmer"], peer_type=NodeType.FULL_NODE, peer_port=int(mainnet_port))
Expand Down

0 comments on commit 1cce93e

Please sign in to comment.