TxBuilder: copy version/locktime in fromTransaction
This commit is contained in:
parent
510212a3bd
commit
a529b3fa0b
3 changed files with 31 additions and 0 deletions
|
@ -19,6 +19,10 @@ function TransactionBuilder() {
|
|||
TransactionBuilder.fromTransaction = function(transaction) {
|
||||
var txb = new TransactionBuilder()
|
||||
|
||||
// Copy other transaction fields
|
||||
txb.tx.version = transaction.version
|
||||
txb.tx.locktime = transaction.locktime
|
||||
|
||||
// Extract/add inputs
|
||||
transaction.ins.forEach(function(txIn) {
|
||||
txb.addInput(txIn.hash, txIn.index, txIn.sequence)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue