bitcoinjs/node-bitcoin-p2p — Issue #57: can't run bitcoinjs with monog
Author: 0i0
Created: 2012-01-01 23:00:35+00:00
State: open

I'm now able to run the deamon successfully and download blocks.. Yupi!
but i can't manage to run it with mongo (which i need for some block chain diggin)

i added two console logs in the code one of the uri before the db instance is created and on of the db object after it was created

this is what i get
$ bitcoinjs run
The "sys" module is now called "util". It should have a similar interface.

(((B))) BitcoinJS Daemon v0.2.1 (node-bitcoin-p2p)
Copyright (c) 2011 BitcoinJS Project

LICENSE This program is free software; you can redistribute it and/or modify
it under the terms of the MIT license.

2 Jan 00:55:26 - info: Loading configuration
mongodb://localhost/bitcoin
{ databaseName: 'bitcoin',
serverConfig:
{ host: 'localhost',
port: 27017,
options: { auto_reconnect: true },
internalMaster: false,
connected: false,
poolSize: 1,
ssl: false,
slaveOk: undefined,
autoReconnect: [Getter],
connection: [Getter/Setter],
master: [Getter/Setter],
primary: [Getter],
readPreference: [Getter],
socketOptions: {},
logger: { error: [Function], log: [Function], debug: [Function] },
eventHandlers:
{ error: [],
parseError: [],
poolReady: [],
message: [],
close: [],
timeout: [] },
_serverState: 'disconnected',
_state: { runtimeStats: [Object] },
recordQueryStats: false,
queryStats: [Getter],
runtimeStats: [Getter] },
options: {},
native_parser: undefined,
bson: {},
state: [Getter],
pkFactory:
{ [Function: ObjectID]
index: 0,
createPk: [Function: createPk],
createFromHexString: [Function: createFromHexString] },
forceServerObjectId: false,
operationTimeout: 1000,
strict: false,
notReplied: {},
isInitializing: true,
auths: [],
commands: [],
_callBackStore: { _notReplied: {} },
logger: { error: [Function], log: [Function], debug: [Function] },
slaveOk: false,
tag: 1325458526555,
_mongodbHandlers: { _mongodbCallbacks: {}, _notReplied: {} },
eventHandlers:
{ error: [],
parseError: [],
poolReady: [],
message: [],
close: [] },
serializeFunctions: false,
raw: false,
recordQueryStats: false,
reaperEnabled: false,
_lastReaperTimestamp: 1325458526555,
retryMiliSeconds: 5000,
numberOfRetries: 5,
reaperInterval: 10000,
reaperTimeout: 30000 }
2 Jan 00:55:26 - error: Initialization error: TypeError: Cannot read property 'Binary' of undefined
at new MongoStorage (/usr/local/lib/node_modules/bitcoinjs/lib/db/mongo/storage.js:28:34)
at Function.get (/usr/local/lib/node_modules/bitcoinjs/lib/storage.js:14:12)
at new Node (/usr/local/lib/node_modules/bitcoinjs/lib/node.js:53:28)
at createNode (/usr/local/lib/node_modules/bitcoinjs/daemon/init.js:176:10)
at Object. (/usr/local/lib/node_modules/bitcoinjs/daemon/start.js:5:12)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)