Browse Source

Moves network import to top

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
69823552c3
  1. 5
      test/message.js

5
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))
})
})

Loading…
Cancel
Save