From 905f5ba1a50ffc2007ed7568f2c6c9b99f60a0ef Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 9 Nov 2016 12:30:06 +1100 Subject: [PATCH] transaction: hashForWitnessV0 s/amount/value --- src/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction.js b/src/transaction.js index db28666..b19fe8a 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -303,7 +303,7 @@ Transaction.prototype.hashForSignature = function (inIndex, prevOutScript, hashT return bcrypto.hash256(buffer) } -Transaction.prototype.hashForWitnessV0 = function (inIndex, prevOutScript, amount, hashType) { +Transaction.prototype.hashForWitnessV0 = function (inIndex, prevOutScript, value, hashType) { typeforce(types.tuple(types.UInt32, types.Buffer, types.Satoshi, types.UInt32), arguments) var tbuffer, toffset @@ -378,7 +378,7 @@ Transaction.prototype.hashForWitnessV0 = function (inIndex, prevOutScript, amoun writeSlice(input.hash) writeUInt32(input.index) writeVarSlice(prevOutScript) - writeUInt64(amount) + writeUInt64(value) writeUInt32(input.sequence) writeSlice(hashOutputs) writeUInt32(this.locktime)