Use buffer-reverse instead [].reverse.call
This commit is contained in:
parent
f999ff6382
commit
bc9a95e0ae
3 changed files with 9 additions and 6 deletions
|
@ -2,6 +2,7 @@ var baddress = require('./address')
|
|||
var bcrypto = require('./crypto')
|
||||
var bscript = require('./script')
|
||||
var bufferEquals = require('buffer-equals')
|
||||
var bufferReverse = require('buffer-reverse')
|
||||
var networks = require('./networks')
|
||||
var ops = require('./opcodes')
|
||||
var typeforce = require('typeforce')
|
||||
|
@ -198,7 +199,7 @@ TransactionBuilder.prototype.addInput = function (txHash, vout, sequence, prevOu
|
|||
// is it a hex string?
|
||||
if (typeof txHash === 'string') {
|
||||
// transaction hashs's are displayed in reverse order, un-reverse it
|
||||
txHash = [].reverse.call(new Buffer(txHash, 'hex'))
|
||||
txHash = bufferReverse(new Buffer(txHash, 'hex'))
|
||||
|
||||
// is it a Transaction object?
|
||||
} else if (txHash instanceof Transaction) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue