tests: clean up unused variables
This commit is contained in:
parent
cbc062d13c
commit
15cc165b05
@ -204,6 +204,7 @@ describe('TransactionBuilder', function () {
|
|||||||
txb.addInput(input.txId, input.vout)
|
txb.addInput(input.txId, input.vout)
|
||||||
signs = Math.max(signs, input.signs.length)
|
signs = Math.max(signs, input.signs.length)
|
||||||
})
|
})
|
||||||
|
|
||||||
f.outputs.forEach(function (output) {
|
f.outputs.forEach(function (output) {
|
||||||
txb.addOutput(Script.fromASM(output.script), output.value)
|
txb.addOutput(Script.fromASM(output.script), output.value)
|
||||||
})
|
})
|
||||||
@ -214,7 +215,6 @@ describe('TransactionBuilder', function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
var tx
|
var tx
|
||||||
var forceFixMultisigSigOrder = false
|
|
||||||
|
|
||||||
for (var i = 0; i < signs; i++) {
|
for (var i = 0; i < signs; i++) {
|
||||||
if (tx) {
|
if (tx) {
|
||||||
@ -224,7 +224,7 @@ describe('TransactionBuilder', function () {
|
|||||||
f.inputs.forEach(function (input, index) {
|
f.inputs.forEach(function (input, index) {
|
||||||
var privKey = bitcoin.ECKey.fromWIF(input.signs[i].privKey)
|
var privKey = bitcoin.ECKey.fromWIF(input.signs[i].privKey)
|
||||||
var redeemScript = bitcoin.Script.fromASM(input.redeemScript)
|
var redeemScript = bitcoin.Script.fromASM(input.redeemScript)
|
||||||
txb.sign(index, privKey, redeemScript, null, forceFixMultisigSigOrder)
|
txb.sign(index, privKey, redeemScript)
|
||||||
})
|
})
|
||||||
|
|
||||||
tx = txb.buildIncomplete()
|
tx = txb.buildIncomplete()
|
||||||
@ -236,8 +236,6 @@ describe('TransactionBuilder', function () {
|
|||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
||||||
forceFixMultisigSigOrder = false
|
|
||||||
|
|
||||||
// manually mess up the signatures
|
// manually mess up the signatures
|
||||||
f.inputs.forEach(function (input, index) {
|
f.inputs.forEach(function (input, index) {
|
||||||
// remove all OP_0s
|
// remove all OP_0s
|
||||||
@ -255,9 +253,7 @@ describe('TransactionBuilder', function () {
|
|||||||
assert.equal(tx.toHex(), f.txHexIncomplete, 'txHexIncomplete')
|
assert.equal(tx.toHex(), f.txHexIncomplete, 'txHexIncomplete')
|
||||||
|
|
||||||
tx = txb.build()
|
tx = txb.build()
|
||||||
|
|
||||||
assert.equal(tx.toHex(), f.txHexComplete, 'txHexComplete')
|
assert.equal(tx.toHex(), f.txHexComplete, 'txHexComplete')
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user