integration: wait for duplicate R value recovery to finish
This commit is contained in:
parent
006c798faf
commit
b6fa347214
1 changed files with 4 additions and 4 deletions
|
@ -90,7 +90,7 @@ describe('bitcoinjs-lib (crypto)', function () {
|
||||||
assert.strictEqual(recovered.toBase58(), master.toBase58())
|
assert.strictEqual(recovered.toBase58(), master.toBase58())
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can recover a private key from duplicate R values', function () {
|
it('can recover a private key from duplicate R values', function (done) {
|
||||||
var inputs = [
|
var inputs = [
|
||||||
{
|
{
|
||||||
txId: 'f4c16475f2a6e9c602e4a287f9db3040e319eb9ece74761a4b84bc820fbeef50',
|
txId: 'f4c16475f2a6e9c602e4a287f9db3040e319eb9ece74761a4b84bc820fbeef50',
|
||||||
|
@ -102,9 +102,7 @@ describe('bitcoinjs-lib (crypto)', function () {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
var txIds = inputs.map(function (x) {
|
var txIds = inputs.map(function (x) { return x.txId })
|
||||||
return x.txId
|
|
||||||
})
|
|
||||||
|
|
||||||
// first retrieve the relevant transactions
|
// first retrieve the relevant transactions
|
||||||
blockchain.transactions.get(txIds, function (err, results) {
|
blockchain.transactions.get(txIds, function (err, results) {
|
||||||
|
@ -183,6 +181,8 @@ describe('bitcoinjs-lib (crypto)', function () {
|
||||||
assert.strictEqual(d1.toString(), d2.toString())
|
assert.strictEqual(d1.toString(), d2.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue