Created
May 21, 2011 11:24
-
-
Save booo/984448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 May 03:38:59 - info: Loading genesis block | |
21 May 03:38:59 - info: Connecting to peer localhost:8333 | |
21 May 03:38:59 - info: Connection refused for localhost:8333 | |
21 May 03:38:59 - info: IRC Bootstrap found 14 peers | |
21 May 03:39:04 - info: Connecting to peer 142.244.185.198:18333 | |
21 May 03:39:04 - info: Connecting to peer 67.82.96.109:18333 | |
21 May 03:39:04 - info: Connecting to peer 81.141.76.31:18333 | |
21 May 03:39:04 - info: Connecting to peer 178.18.90.41:18333 | |
21 May 03:39:04 - info: Connecting to peer 66.9.24.5:18333 | |
21 May 03:39:04 - info: Connecting to peer 109.239.89.147:18333 | |
21 May 03:39:04 - info: Connecting to peer 86.49.3.230:18333 | |
21 May 03:39:04 - info: Connection refused for 109.239.89.147:18333 | |
21 May 03:39:04 - info: Connection refused for 66.9.24.5:18333 | |
21 May 03:39:04 - warn: Error: EHOSTUNREACH, No route to host | |
21 May 03:39:04 - info: Downloading blocks 0/19630 (top: 000000000019d6689c08, queued: 0) | |
21 May 03:39:06 - info: Downloading blocks 0/19630 (top: 00000005106f1d8d144a, queued: 501) | |
21 May 03:39:09 - info: Downloading blocks 0/19630 (top: 0000000079c75f57b592, queued: 1002) | |
21 May 03:39:11 - error: Error while creating block locator: �4����c���.��@��� �ݾV�� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var Bitcoin = require('../lib/bitcoin'); | |
// Settings | |
// ----------------------------------------------------------------------------- | |
var settings = new Bitcoin.Settings(); | |
// Connect to test Bitcoin network | |
settings.setTestnetDefaults(); | |
settings.network.initialPeers.push('localhost'); | |
// MongoDB URI | |
settings.storage.uri ='mongodb://localhost/bitcoin'; | |
node = new Bitcoin.Node(settings); | |
node.addPeer('localhost'); | |
node.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Settings.prototype.setTestnetDefaults = function () { | |
this.setLivenetDefaults(); | |
this.network.type = 'testnet'; | |
this.network.magicBytes = new Buffer('fabfb5da', 'hex'); | |
this.network.bootstrap = [ | |
new IrcBootstrapper('irc.lfnet.org', '#bitcoinTEST') | |
]; | |
//gensis block for testnet | |
this.network.genesisBlock = { | |
'height': 0, | |
'nonce': 384568319, | |
'version': 1, | |
'hash': new Buffer('08b067b31dc139ee8e7a76a4f2cfcca477c4c06e1ef89f4ae308951907000000', 'hex'), | |
'prev_hash': new Buffer(32).clear(), | |
'timestamp': 1296688602, | |
'merkle_root': new Buffer('3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a', 'hex'), | |
'bits': 487063544 | |
}; | |
this.network.genesisBlockTx = { | |
'outs': [{ | |
'value': new Buffer('00F2052A01000000', 'hex'), // 50 BTC | |
'script': Binary.put() | |
.word8(65) // ??? | |
.put(new Buffer('04678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5F', 'hex')) | |
.word8(0xAC) | |
.buffer() // OP_CHECKSIG | |
}], | |
'lock_time': 0, | |
'version': 1, | |
'hash': new Buffer('3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a', 'hex'), | |
'ins': [{ | |
'sequence': 0xFFFFFFFF, | |
'outpoint': { | |
'index': 0xFFFFFFFF, | |
'hash': new Buffer(32).clear() | |
}, | |
'script': Binary.put() | |
.put(new Buffer('04FFFF001D010445', 'hex')) | |
.put(new Buffer('The Times 03/Jan/2009 Chancellor on brink of second bailout for banks', 'ascii')) | |
.buffer() | |
}] | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment