From 75d2d0d390862e0c30e62a30dc1dd75c0f908d61 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Tue, 22 Apr 2014 22:28:31 -0300 Subject: [PATCH] fix issues with ConnectionTor example and Connection class --- examples/ConnectionTor.js | 4 ++-- lib/Connection.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ConnectionTor.js b/examples/ConnectionTor.js index 2d9d8a6..c96040f 100644 --- a/examples/ConnectionTor.js +++ b/examples/ConnectionTor.js @@ -1,5 +1,5 @@ -var Peer = require('../Peer'); -var Connection = require('../Connection'); +var Peer = require('../lib/Peer'); +var Connection = require('../lib/Connection'); var dns = require('dns'); // get a peer from dns seed diff --git a/lib/Connection.js b/lib/Connection.js index 4b40d16..1377545 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -18,7 +18,7 @@ var Parser = imports.Parser || require('../util/BinaryParser'); var buffertools = imports.buffertools || require('buffertools'); var doubleSha256 = imports.doubleSha256 || util.twoSha256; var SecureRandom = imports.SecureRandom || require('./SecureRandom'); -var nonce = function() {return SecureRandom.getPseudoRandomBuffer(8)}; +var nonce = SecureRandom.getPseudoRandomBuffer(8); var BIP0031_VERSION = 60000;