From 267b0c5d00603f6ce6675b7b3d48889a8c1de237 Mon Sep 17 00:00:00 2001 From: junderw Date: Tue, 21 May 2019 16:26:00 +0900 Subject: [PATCH] Easier var names --- test/integration/csv.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/integration/csv.js b/test/integration/csv.js index 4cd54ab..5900c74 100644 --- a/test/integration/csv.js +++ b/test/integration/csv.js @@ -19,17 +19,17 @@ describe('bitcoinjs-lib (transactions w/ CSV)', () => { const hashType = bitcoin.Transaction.SIGHASH_ALL // IF MTP (from when confirmed) > seconds, aQ can redeem - function csvCheckSigOutput (aQ, bQ, sequence) { + function csvCheckSigOutput (_alice, _bob, sequence) { return bitcoin.script.fromASM(` OP_IF ${bitcoin.script.number.encode(sequence).toString('hex')} OP_CHECKSEQUENCEVERIFY OP_DROP OP_ELSE - ${bQ.publicKey.toString('hex')} + ${_bob.publicKey.toString('hex')} OP_CHECKSIGVERIFY OP_ENDIF - ${aQ.publicKey.toString('hex')} + ${_alice.publicKey.toString('hex')} OP_CHECKSIG `.trim().replace(/\s+/g, ' ')) } @@ -40,7 +40,7 @@ describe('bitcoinjs-lib (transactions w/ CSV)', () => { // Ref: https://github.com/bitcoinbook/bitcoinbook/blob/f8b883dcd4e3d1b9adf40fed59b7e898fbd9241f/ch07.asciidoc#complex-script-example // Note: bitcoinjs-lib will not offer specific support for problems with // advanced script usages such as below. Use at your own risk. - function complexCsvOutput (aQ, bQ, cQ, dQ, sequence1, sequence2) { + function complexCsvOutput (_alice, _bob, _charles, _dave, sequence1, sequence2) { return bitcoin.script.fromASM(` OP_IF OP_IF @@ -49,20 +49,20 @@ describe('bitcoinjs-lib (transactions w/ CSV)', () => { ${bitcoin.script.number.encode(sequence1).toString('hex')} OP_CHECKSEQUENCEVERIFY OP_DROP - ${aQ.publicKey.toString('hex')} + ${_alice.publicKey.toString('hex')} OP_CHECKSIGVERIFY OP_1 OP_ENDIF - ${bQ.publicKey.toString('hex')} - ${cQ.publicKey.toString('hex')} - ${dQ.publicKey.toString('hex')} + ${_bob.publicKey.toString('hex')} + ${_charles.publicKey.toString('hex')} + ${_dave.publicKey.toString('hex')} OP_3 OP_CHECKMULTISIG OP_ELSE ${bitcoin.script.number.encode(sequence2).toString('hex')} OP_CHECKSEQUENCEVERIFY OP_DROP - ${aQ.publicKey.toString('hex')} + ${_alice.publicKey.toString('hex')} OP_CHECKSIG OP_ENDIF `.trim().replace(/\s+/g, ' '))