fix aes tests.
This commit is contained in:
parent
70b83f22fa
commit
b8997c9212
@ -135,7 +135,7 @@ TXDB.prototype._testFilter = function _testFilter(addresses) {
|
||||
// Outputs: Technically uniqified by ID, but id/name works too.
|
||||
|
||||
// What they need (api):
|
||||
// outputs: [ - SAME AS OUTPUTS ABOVE!!!
|
||||
// outputs: [
|
||||
// // Sum of value:
|
||||
// { value: 0, id: wallet-id, name: account, index: account }
|
||||
// ]
|
||||
@ -305,8 +305,6 @@ TXDB.prototype.getMap = function getMap(tx, callback) {
|
||||
|
||||
map = WalletMap.fromTX(table, tx);
|
||||
|
||||
utils.print(map.toJSON());
|
||||
|
||||
return callback(null, map);
|
||||
});
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ var crypto = require('crypto');
|
||||
|
||||
describe('AES', function() {
|
||||
function pbkdf2key(passphrase, iterations, dkLen, ivLen, alg) {
|
||||
var key = utils.pbkdf2(passphrase, '', iterations, dkLen + ivLen, 'sha512');
|
||||
var key = utils.pbkdf2Sync(passphrase, '', iterations, dkLen + ivLen, 'sha512');
|
||||
return {
|
||||
key: key.slice(0, dkLen),
|
||||
iv: key.slice(dkLen, dkLen + ivLen)
|
||||
|
||||
@ -90,7 +90,8 @@ describe('HD', function() {
|
||||
var master, child1, child2, child3, child4, child5, child6;
|
||||
|
||||
it('should create a pbkdf2 seed', function() {
|
||||
var checkSeed = bcoin.utils.pbkdf2(phrase, 'mnemonic' + 'foo', 2048, 64, 'sha512').toString('hex');
|
||||
var checkSeed = bcoin.utils.pbkdf2Sync(
|
||||
phrase, 'mnemonic' + 'foo', 2048, 64, 'sha512').toString('hex');
|
||||
assert.equal(checkSeed, seed);
|
||||
});
|
||||
|
||||
|
||||
@ -873,7 +873,6 @@ describe('Wallet', function() {
|
||||
assert.ifError(err);
|
||||
w1.master.stop();
|
||||
w1.master.key = null;
|
||||
utils.print(w1.toJSON());
|
||||
|
||||
// Coinbase
|
||||
var t1 = bcoin.mtx()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user