Browse Source

Merge pull request #17 from matiu/bug/callback-on-rpc-error

Bug/callback on rpc error
patch-2
Ryan X. Charles 11 years ago
parent
commit
dae419e81f
  1. 2
      Connection.js
  2. 4
      RpcClient.js
  3. 2
      config.js

2
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) {

4
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);

2
config.js

@ -1,4 +1,4 @@
module.exports = {
network: 'livenet',
logging: 'normal' // none, normal, debug
logger: 'normal' // none, normal, debug
};

Loading…
Cancel
Save