Browse Source

darkfid/darkfid_config: added missing p2p config options

skoupidi 1 year ago
parent
commit
8cff305b5b
2 changed files with 22 additions and 4 deletions
  1. 21 3
      bin/darkfid/darkfid_config.toml
  2. 1 1
      bin/darkfid/src/rpc.rs

+ 21 - 3
bin/darkfid/darkfid_config.toml

@@ -73,8 +73,14 @@ rpc_disabled_methods = ["p2p.get_info"]
 
 
 ## Localnet P2P network settings
 ## Localnet P2P network settings
 [network_config."localnet".net]
 [network_config."localnet".net]
+# Path to the P2P datastore
+p2p_datastore = "~/.local/share/darkfi/darkfid/localnet"
+
+# Path to a configured hostlist for saving known peers
+hostlist = "~/.local/share/darkfi/darkfid/localnet/p2p_hostlist.tsv"
+
 # P2P accept addresses the instance listens on for inbound connections
 # P2P accept addresses the instance listens on for inbound connections
-inbound = ["tcp+tls://0.0.0.0:8242"]
+#inbound = ["tcp+tls://0.0.0.0:8242"]
 
 
 # P2P external addresses the instance advertises so other peers can
 # P2P external addresses the instance advertises so other peers can
 # reach us and connect to us, as long as inbound addrs are configured.
 # reach us and connect to us, as long as inbound addrs are configured.
@@ -187,9 +193,15 @@ rpc_disabled_methods = ["p2p.get_info"]
 
 
 ## Testnet P2P network settings
 ## Testnet P2P network settings
 [network_config."testnet".net]
 [network_config."testnet".net]
+# Path to the P2P datastore
+p2p_datastore = "~/.local/share/darkfi/darkfid/testnet"
+
+# Path to a configured hostlist for saving known peers
+hostlist = "~/.local/share/darkfi/darkfid/testnet/p2p_hostlist.tsv"
+
 # P2P accept addresses the instance listens on for inbound connections
 # P2P accept addresses the instance listens on for inbound connections
 # You can also use an IPv6 address
 # You can also use an IPv6 address
-inbound = ["tcp+tls://0.0.0.0:8342"]
+#inbound = ["tcp+tls://0.0.0.0:8342"]
 # IPv6 version:
 # IPv6 version:
 #inbound = ["tcp+tls://[::]:8342"]
 #inbound = ["tcp+tls://[::]:8342"]
 # Combined:
 # Combined:
@@ -305,9 +317,15 @@ rpc_disabled_methods = ["p2p.get_info"]
 
 
 ## Mainnet P2P network settings
 ## Mainnet P2P network settings
 [network_config."mainnet".net]
 [network_config."mainnet".net]
+# Path to the P2P datastore
+p2p_datastore = "~/.local/share/darkfi/darkfid/mainnet"
+
+# Path to a configured hostlist for saving known peers
+hostlist = "~/.local/share/darkfi/darkfid/mainnet/p2p_hostlist.tsv"
+
 # P2P accept addresses the instance listens on for inbound connections
 # P2P accept addresses the instance listens on for inbound connections
 # You can also use an IPv6 address
 # You can also use an IPv6 address
-inbound = ["tcp+tls://0.0.0.0:8442"]
+#inbound = ["tcp+tls://0.0.0.0:8442"]
 # IPv6 version:
 # IPv6 version:
 #inbound = ["tcp+tls://[::]:8442"]
 #inbound = ["tcp+tls://[::]:8442"]
 # Combined:
 # Combined:

+ 1 - 1
bin/darkfid/src/rpc.rs

@@ -181,7 +181,7 @@ impl DarkfiNode {
 
 
     // RPCAPI:
     // RPCAPI:
     // Initializes a subscription to p2p dnet events.
     // Initializes a subscription to p2p dnet events.
-    // Once a subscription is established, `darkirc` will send JSON-RPC notifications of
+    // Once a subscription is established, `darkfid` will send JSON-RPC notifications of
     // new network events to the subscriber.
     // new network events to the subscriber.
     //
     //
     // --> {"jsonrpc": "2.0", "method": "dnet.subscribe_events", "params": [], "id": 1}
     // --> {"jsonrpc": "2.0", "method": "dnet.subscribe_events", "params": [], "id": 1}