benchmarks.

This commit is contained in:
Christopher Jeffrey 2016-07-15 10:05:48 -07:00
parent 84b94fd1b5
commit 5e52c7f373
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 17 additions and 0 deletions

View File

@ -60,6 +60,22 @@ function runBench(callback) {
next();
});
},
function(next) {
var end = bench('addrs');
utils.forRange(0, 1000, function(i, next) {
utils.forRange(0, 10, function(j, next) {
wallet.createReceive(i, function(err, addr) {
assert.ifError(err);
addrs.push(addr);
next();
});
}, next);
}, function(err) {
assert.ifError(err);
end(1000 * 10);
next();
});
},
function(next) {
var nonce = new bn(0);
var end;

View File

@ -568,6 +568,7 @@ Wallet.prototype.createChange = function createChange(account, callback) {
*/
Wallet.prototype.createAddress = function createAddress(account, change, callback) {
var self = this;
var unlock;
if (typeof change === 'function') {