Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 389d6a582da5ac8f17e164398554398e4dd869f3 1 parent 2fb3711
Stefan Thomas authored July 02, 2011
37  daemon/settings.example.js
... ...
@@ -1,5 +1,40 @@
1 1
 var cfg = new (require('../lib/settings').Settings)();
2 2
 
3  
-// Settings here
  3
+// JSON-RPC SECTION
  4
+// -----------------------------------------------------------------------------
  5
+//
  6
+// To activate the JSON-RPC API, you have to at least set this option to true
  7
+// and choose an RPC password below. Please make sure you select a secure
  8
+// password.
  9
+cfg.jsonrpc.enabled = false;
  10
+
  11
+// JSON-RPC login
  12
+//
  13
+// These are the credentials you later use to login to the RPC API.
  14
+cfg.jsonrpc.username = "admin";
  15
+cfg.jsonrpc.password = null; // Note: You MUST set a password to enable RPC
  16
+
  17
+// JSON-RPC TCP/IP settings
  18
+//
  19
+// Here you can specify what interface and port to listen on. We strongly re-
  20
+// commend to leave .host set at "127.0.0.1".
  21
+cfg.jsonrpc.host = "127.0.0.1";
  22
+cfg.jsonrpc.port = 8432;
  23
+
  24
+// NETWORK SECTION
  25
+// -----------------------------------------------------------------------------
  26
+// Connect
  27
+//
  28
+// We default to connect=auto mode. This means that we'll try to connect to
  29
+// a bitcoind running at localhost:8333 first as a proxy and if that doesn't
  30
+// work, we'll try connecting to the P2P network directly.
  31
+//
  32
+// Valid values:
  33
+//   "localhost:8333"     - Connect to a single node
  34
+//   ["server:8333", ...] - Connect to multiple nodes
  35
+//   "auto"               - Connect to localhost:8333 if available and
  36
+//                          disable bootstrapping and other known nodes.
  37
+//   null                 - Use bootstrapping (see below)
  38
+cfg.network.connect = "auto";
4 39
 
5 40
 module.exports = cfg;
10  lib/settings.js
@@ -41,12 +41,22 @@ Settings.prototype.setJsonRpcDefaults = function () {
41 41
  * unless overridden in the respective functions. So if you change something
42 42
  * in the livenet defaults, make sure you update the other functions if
43 43
  * necessary.
  44
+ *
  45
+ * For more detailed documentation on some of these settings, please see
  46
+ * daemon/settings.example.js.
44 47
  */
45 48
 Settings.prototype.setLivenetDefaults = function () {
46 49
   this.network.type = 'livenet';
47 50
   this.network.port = 8333;
48 51
   this.network.magicBytes = hex('f9beb4d9');
  52
+
  53
+  // Force the node to connect to a specific node or nodes
  54
+  this.network.connect = null;
  55
+
  56
+  // List of peers to add to the list of known peers
49 57
   this.network.initialPeers = [];
  58
+
  59
+  // List of bootstrapping mechanisms
50 60
   this.network.bootstrap = [
51 61
     new DnsBootstrapper([
52 62
       "bitseed.xf2.org",

0 notes on commit 389d6a5

Please sign in to comment.
Something went wrong with that request. Please try again.