test: update tests to new API

This commit is contained in:
David Dias
2018-02-07 08:22:03 +00:00
parent 59df82a675
commit f7f85dce0a
6 changed files with 78 additions and 150 deletions

View File

@ -215,11 +215,11 @@ class Node extends EventEmitter {
this._getPeerInfo(peer, (err, peerInfo) => {
if (err) { return callback(err) }
this.switch.dial(peerInfo, (err, conn) => {
this.switch.dial(peerInfo, (err) => {
if (err) { return callback(err) }
this.peerBook.put(peerInfo)
callback(null, conn)
callback()
})
})
}