|
|
@ -18,6 +18,7 @@ var doubleSha256 = util.twoSha256; |
|
|
|
var SecureRandom = require('./SecureRandom'); |
|
|
|
var nonce = SecureRandom.getPseudoRandomBuffer(8); |
|
|
|
var nodeUtil = require('util'); |
|
|
|
var EventEmitter = require('events').EventEmitter; |
|
|
|
|
|
|
|
var BIP0031_VERSION = 60000; |
|
|
|
|
|
|
@ -59,7 +60,6 @@ function Connection(socket, peer, opts) { |
|
|
|
|
|
|
|
this.setupHandlers(); |
|
|
|
} |
|
|
|
var EventEmitter = require('events').EventEmitter; |
|
|
|
nodeUtil.inherits(Connection, EventEmitter); |
|
|
|
Connection.prototype.open = function(callback) { |
|
|
|
if (typeof callback === 'function') this.once('connect', callback); |
|
|
|