Skip to content

Instantly share code, notes, and snippets.

@rktoomey
Created March 31, 2015 21:09
Show Gist options
  • Save rktoomey/f21265761e2941dce821 to your computer and use it in GitHub Desktop.
Save rktoomey/f21265761e2941dce821 to your computer and use it in GitHub Desktop.
networks.js support for regtest
Index: ../bitcore/lib/networks.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ../bitcore/lib/networks.js (revision 1004aee17e7189bde59dd983bd456d7e3e7a418b)
+++ ../bitcore/lib/networks.js (revision )
@@ -143,9 +143,23 @@
'testnet-seed.bluematt.me',
'testnet-seed.alexykot.me',
'testnet-seed.bitcoin.schildbach.de'
- ],
+ ]
});
+// regtest is based off testnet2 params, while 'testnet' above is based off testnet3 params
+addNetwork({
+ name: 'regtest',
+ alias: 'regtest',
+ pubkeyhash: 0x6f,
+ privatekey: 0xef,
+ scripthash: 0xc4,
+ xpubkey: 0x043587cf,
+ xprivkey: 0x04358394,
+ networkMagic: 0xfabfb5da,
+ port: 18444,
+ dnsSeeds: []
+});
+
/**
* @instance
* @member Networks#livenet
@@ -159,6 +173,12 @@
var testnet = getNetwork('testnet');
/**
+ * @instance
+ * @member Networks#regtest
+ */
+var regtest = getNetwork('regtest');
+
+/**
* @namespace Networks
*/
module.exports = {
@@ -168,5 +188,6 @@
livenet: livenet,
mainnet: livenet,
testnet: testnet,
+ regtest: regtest,
get: getNetwork
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment