From 1d6b1fe58bd6d15ab18ff3398e1336f5afe784e4 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 24 May 2014 13:54:46 +1000 Subject: [PATCH] message: better variable names --- test/message.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/message.js b/test/message.js index 5ad63bf..8a798ee 100644 --- a/test/message.js +++ b/test/message.js @@ -24,13 +24,13 @@ describe('Message', function() { fixtures.valid.verify.forEach(function(f) { var network = networks[f.network] - var s1 = new Buffer(f.signature, 'base64') - assert.ok(Message.verify(f.address, s1, f.message, network)) + var signature = new Buffer(f.signature, 'base64') + assert.ok(Message.verify(f.address, signature, f.message, network)) if (f.compressed) { - var s2 = new Buffer(f.compressed.signature, 'base64') + var compressedSignature = new Buffer(f.compressed.signature, 'base64') - assert.ok(Message.verify(f.compressed.address, s2, f.message, network)) + assert.ok(Message.verify(f.compressed.address, compressedSignature, f.message, network)) } }) }) @@ -48,15 +48,15 @@ describe('Message', function() { it(f.description, function() { var network = networks[f.network] - var k1 = new ECKey(new BigInteger(f.D), false) - var s1 = Message.sign(k1, f.message, network) - assert.equal(s1.toString('base64'), f.signature) + var privKey = new ECKey(new BigInteger(f.D), false) + var signature = Message.sign(privKey, f.message, network) + assert.equal(signature.toString('base64'), f.signature) if (f.compressed) { - var k2 = new ECKey(new BigInteger(f.D)) - var s2 = Message.sign(k2, f.message) + var compressedPrivKey = new ECKey(new BigInteger(f.D)) + var compressedSignature = Message.sign(compressedPrivKey, f.message) - assert.equal(s2.toString('base64'), f.compressed.signature) + assert.equal(compressedSignature.toString('base64'), f.compressed.signature) } }) })