transaction: hashForWitnessV0 s/amount/value
This commit is contained in:
parent
768f7e314c
commit
905f5ba1a5
1 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ Transaction.prototype.hashForSignature = function (inIndex, prevOutScript, hashT
|
||||||
return bcrypto.hash256(buffer)
|
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)
|
typeforce(types.tuple(types.UInt32, types.Buffer, types.Satoshi, types.UInt32), arguments)
|
||||||
|
|
||||||
var tbuffer, toffset
|
var tbuffer, toffset
|
||||||
|
@ -378,7 +378,7 @@ Transaction.prototype.hashForWitnessV0 = function (inIndex, prevOutScript, amoun
|
||||||
writeSlice(input.hash)
|
writeSlice(input.hash)
|
||||||
writeUInt32(input.index)
|
writeUInt32(input.index)
|
||||||
writeVarSlice(prevOutScript)
|
writeVarSlice(prevOutScript)
|
||||||
writeUInt64(amount)
|
writeUInt64(value)
|
||||||
writeUInt32(input.sequence)
|
writeUInt32(input.sequence)
|
||||||
writeSlice(hashOutputs)
|
writeSlice(hashOutputs)
|
||||||
writeUInt32(this.locktime)
|
writeUInt32(this.locktime)
|
||||||
|
|
Loading…
Reference in a new issue