message: use messagePrefix naming over magicPrefix
This commit is contained in:
parent
607b3b7983
commit
1079bf95c1
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue