From 69823552c3b29f8256a194ca9720e259ccc5acab Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 21 Apr 2014 21:24:44 +1000 Subject: [PATCH] Moves network import to top --- test/message.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/message.js b/test/message.js index c4cda2e..a18c3f5 100644 --- a/test/message.js +++ b/test/message.js @@ -1,6 +1,7 @@ var assert = require('assert') var ECKey = require('../src/eckey').ECKey var Message = require('../').Message +var network = require('../').network describe('Message', function() { var msg @@ -69,12 +70,10 @@ describe('Message', function() { describe('testnet address', function(){ it('works', function(){ - var testnet = require('../').network.testnet - var key = ECKey.makeRandom() var sig = Message.sign(key, msg) - var addr = key.pub.getAddress(testnet.pubKeyHash) + var addr = key.pub.getAddress(network.testnet.pubKeyHash) assert(Message.verify(addr, sig, msg)) }) })