From 845c1dc19962bd2116808cdd1195b0df71cc4ed3 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 25 Aug 2015 13:59:19 +1000 Subject: [PATCH] integration: fix stealth tests --- test/integration/crypto.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/integration/crypto.js b/test/integration/crypto.js index 1cc4281..a494675 100644 --- a/test/integration/crypto.js +++ b/test/integration/crypto.js @@ -24,8 +24,8 @@ describe('bitcoinjs-lib (crypto)', function () { var Qprime = Q.add(cG) return { - sharedQ: Qprime, - nonceQ: noncePair.Q + shared: new bitcoin.ECPair(null, Qprime), + nonce: new bitcoin.ECPair(null, noncePair.Q) } } @@ -41,12 +41,12 @@ describe('bitcoinjs-lib (crypto)', function () { var receiver = bitcoin.ECPair.fromWIF('5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss') var stealthS = stealthSend(receiver.Q) // public, done by sender - // ... sender now reveals nonceQ to receiver + // ... sender now reveals nonce to receiver - var stealthR = stealthReceive(receiver.d, stealthS.nonceQ) // private, done by receiver + var stealthR = stealthReceive(receiver.d, stealthS.nonce.Q) // private, done by receiver // and check that we derived both sides correctly - assert.equal(stealthS.sharedQ.getAddress(), stealthR.getAddress()) + assert.equal(stealthS.shared.getAddress(), stealthR.getAddress()) }) // TODO