Skip to content

Commit e5e2425

Browse files
committed
integration: mimic HDNode speedup
1 parent 5846b35 commit e5e2425

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/crypto.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ describe('bitcoinjs-lib (crypto)', function () {
6565

6666
var d1 = child.keyPair.d
6767
var d2
68-
var indexBuffer = new Buffer(4)
68+
var data = new Buffer(37)
69+
serQP.copy(data, 0)
6970

7071
// search index space until we find it
7172
for (var i = 0; i < bitcoin.HDNode.HIGHEST_BIT; ++i) {
72-
indexBuffer.writeUInt32BE(i, 0)
73+
data.writeUInt32BE(i, 33)
7374

7475
// calculate I
75-
var data = Buffer.concat([serQP, indexBuffer])
7676
var I = crypto.createHmac('sha512', master.chainCode).update(data).digest()
7777
var IL = I.slice(0, 32)
7878
var pIL = bigi.fromBuffer(IL)

0 commit comments

Comments
 (0)