Merge pull request #736 from matiu/feat/timeouts
different timeouts for getutxos
This commit is contained in:
commit
c5259a6b0d
|
@ -27,10 +27,12 @@ function Lock(opts) {
|
|||
}
|
||||
};
|
||||
|
||||
Lock.prototype.runLocked = function(token, cb, task) {
|
||||
Lock.prototype.runLocked = function(token, cb, task, waitTime) {
|
||||
$.shouldBeDefined(token);
|
||||
|
||||
this.lock.locked(token, 5 * 1000, 5 * 60 * 1000, function(err, release) {
|
||||
waitTime = waitTime || 5 * 1000;
|
||||
|
||||
this.lock.locked(token, waitTime , 5 * 60 * 1000, function(err, release) {
|
||||
if (err) return cb(Errors.WALLET_BUSY);
|
||||
var _cb = function() {
|
||||
cb.apply(null, arguments);
|
||||
|
|
|
@ -268,9 +268,9 @@ WalletService.getInstanceWithAuth = function(opts, cb) {
|
|||
return authFn(cb);
|
||||
};
|
||||
|
||||
WalletService.prototype._runLocked = function(cb, task) {
|
||||
WalletService.prototype._runLocked = function(cb, task, waitTime) {
|
||||
$.checkState(this.walletId);
|
||||
this.lock.runLocked(this.walletId, cb, task);
|
||||
this.lock.runLocked(this.walletId, cb, task, waitTime);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ WalletService.prototype.createAddress = function(opts, cb) {
|
|||
var createFn = wallet.singleAddress ? getFirstAddress : createNewAddress;
|
||||
return createFn(wallet, cb);
|
||||
});
|
||||
});
|
||||
}, 10 * 1000);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ WalletService.prototype._getBalanceFromAddresses = function(opts, cb, i) {
|
|||
|
||||
storeBalanceCache(balance, cb);
|
||||
});
|
||||
});
|
||||
}, 10 * 1000);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2320,7 +2320,7 @@ WalletService.prototype.createTx = function(opts, cb) {
|
|||
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 10 * 1000);
|
||||
};
|
||||
WalletService.prototype._verifyRequestPubKey = function(requestPubKey, signature, xPubKey) {
|
||||
var pub = (new Bitcore.HDPublicKey(xPubKey)).deriveChild(Constants.PATHS.REQUEST_KEY_AUTH).publicKey;
|
||||
|
|
Loading…
Reference in New Issue