Permalink
Browse files

Settings updated, mostly comments, but added new "connect" setting.

  • Loading branch information...
1 parent 2fb3711 commit 389d6a582da5ac8f17e164398554398e4dd869f3 @justmoon justmoon committed Jul 2, 2011
Showing with 46 additions and 1 deletion.
  1. +36 −1 daemon/settings.example.js
  2. +10 −0 lib/settings.js
@@ -1,5 +1,40 @@
var cfg = new (require('../lib/settings').Settings)();
-// Settings here
+// JSON-RPC SECTION
+// -----------------------------------------------------------------------------
+//
+// To activate the JSON-RPC API, you have to at least set this option to true
+// and choose an RPC password below. Please make sure you select a secure
+// password.
+cfg.jsonrpc.enabled = false;
+
+// JSON-RPC login
+//
+// These are the credentials you later use to login to the RPC API.
+cfg.jsonrpc.username = "admin";
+cfg.jsonrpc.password = null; // Note: You MUST set a password to enable RPC
+
+// JSON-RPC TCP/IP settings
+//
+// Here you can specify what interface and port to listen on. We strongly re-
+// commend to leave .host set at "127.0.0.1".
+cfg.jsonrpc.host = "127.0.0.1";
+cfg.jsonrpc.port = 8432;
+
+// NETWORK SECTION
+// -----------------------------------------------------------------------------
+// Connect
+//
+// We default to connect=auto mode. This means that we'll try to connect to
+// a bitcoind running at localhost:8333 first as a proxy and if that doesn't
+// work, we'll try connecting to the P2P network directly.
+//
+// Valid values:
+// "localhost:8333" - Connect to a single node
+// ["server:8333", ...] - Connect to multiple nodes
+// "auto" - Connect to localhost:8333 if available and
+// disable bootstrapping and other known nodes.
+// null - Use bootstrapping (see below)
+cfg.network.connect = "auto";
module.exports = cfg;
View
@@ -41,12 +41,22 @@ Settings.prototype.setJsonRpcDefaults = function () {
* unless overridden in the respective functions. So if you change something
* in the livenet defaults, make sure you update the other functions if
* necessary.
+ *
+ * For more detailed documentation on some of these settings, please see
+ * daemon/settings.example.js.
*/
Settings.prototype.setLivenetDefaults = function () {
this.network.type = 'livenet';
this.network.port = 8333;
this.network.magicBytes = hex('f9beb4d9');
+
+ // Force the node to connect to a specific node or nodes
+ this.network.connect = null;
+
+ // List of peers to add to the list of known peers
this.network.initialPeers = [];
+
+ // List of bootstrapping mechanisms
this.network.bootstrap = [
new DnsBootstrapper([
"bitseed.xf2.org",

0 comments on commit 389d6a5

Please sign in to comment.