TxBuilder: add sequence number passthrough
This commit is contained in:
parent
f3199b6fce
commit
7f62069d82
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ function TransactionBuilder() {
|
||||||
this.tx = new Transaction()
|
this.tx = new Transaction()
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionBuilder.prototype.addInput = function(prevTx, index, prevOutScript) {
|
TransactionBuilder.prototype.addInput = function(prevTx, index, prevOutScript, sequence) {
|
||||||
var prevOutHash
|
var prevOutHash
|
||||||
|
|
||||||
if (typeof prevTx === 'string') {
|
if (typeof prevTx === 'string') {
|
||||||
|
@ -46,7 +46,7 @@ TransactionBuilder.prototype.addInput = function(prevTx, index, prevOutScript) {
|
||||||
var prevOut = prevOutHash.toString('hex') + ':' + index
|
var prevOut = prevOutHash.toString('hex') + ':' + index
|
||||||
assert(!(prevOut in this.prevOutMap), 'Transaction is already an input')
|
assert(!(prevOut in this.prevOutMap), 'Transaction is already an input')
|
||||||
|
|
||||||
var vout = this.tx.addInput(prevOutHash, index)
|
var vout = this.tx.addInput(prevOutHash, index, sequence)
|
||||||
this.prevOutMap[prevOut] = true
|
this.prevOutMap[prevOut] = true
|
||||||
this.prevOutScripts[vout] = prevOutScript
|
this.prevOutScripts[vout] = prevOutScript
|
||||||
this.prevOutTypes[vout] = prevOutType
|
this.prevOutTypes[vout] = prevOutType
|
||||||
|
|
Loading…
Reference in a new issue