From 8d79a6f38b01d61c751601d77ef258ae55ca0e94 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 14 Jan 2014 15:59:38 -0300 Subject: [PATCH 1/3] fix logger variable name --- config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.js b/config.js index 313ee63..aea295c 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,4 @@ module.exports = { network: 'livenet', - logging: 'normal' // none, normal, debug + logger: 'normal' // none, normal, debug }; From 3674a66d113d7a9b27daff125d932f96a797e9a2 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 14 Jan 2014 15:59:48 -0300 Subject: [PATCH 2/3] remove duplicate require --- Connection.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Connection.js b/Connection.js index 3558b15..21a4670 100644 --- a/Connection.js +++ b/Connection.js @@ -20,8 +20,6 @@ function spec(b) { var doubleSha256 = b.doubleSha256 || util.twoSha256; var nonce = util.generateNonce(); - var Block = require('./Block').class(); - var BIP0031_VERSION = 60000; function Connection(socket, peer) { From 80343227bcb259e53c8bec2142bfa27cbfdf4dc4 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 14 Jan 2014 16:00:05 -0300 Subject: [PATCH 3/3] call callback on connection error --- RpcClient.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RpcClient.js b/RpcClient.js index 5e3b78e..959ea31 100644 --- a/RpcClient.js +++ b/RpcClient.js @@ -180,7 +180,9 @@ function ClassSpec(b) { }); }); req.on('error', function(e) { - log.err('Could not connect to bitcoin via RPC: '+e); + var err = new Error('Could not connect to bitcoin via RPC: '+e.message); + log.err(err); + callback(err); }); req.setHeader('Content-Length', request.length);