We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f432f5b commit bf6ad4eCopy full SHA for bf6ad4e
lib/node.js
@@ -46,13 +46,17 @@ var Node = module.exports = function (opts, cb) {
46
util.inherits(Node, EventEmitter)
47
48
Node.prototype.start = function (cb) {
49
+ var self = this
50
cb = cb || function () {}
51
52
this.peers.on('peerconnect', this._onPeerConnect.bind(this))
53
54
async.parallel([
55
this.peers.connect.bind(this.peers),
- this.chain.sync.bind(this.chain)
56
+ function (cb) {
57
+ self.chain.on('syncing', function () { cb(null) })
58
+ self.chain.sync()
59
+ }
60
], cb)
61
62
this.emit('ready')
0 commit comments