Browse Source

message: use messagePrefix naming over magicPrefix

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
1079bf95c1
  1. 4
      src/message.js

4
src/message.js

@ -11,11 +11,11 @@ var ecurve = require('ecurve')
var ecparams = ecurve.getCurveByName('secp256k1')
function magicHash (message, network) {
var magicPrefix = new Buffer(network.magicPrefix)
var messagePrefix = new Buffer(network.messagePrefix)
var messageBuffer = new Buffer(message)
var lengthBuffer = bufferutils.varIntBuffer(messageBuffer.length)
var buffer = Buffer.concat([magicPrefix, lengthBuffer, messageBuffer])
var buffer = Buffer.concat([messagePrefix, lengthBuffer, messageBuffer])
return crypto.hash256(buffer)
}

Loading…
Cancel
Save