new timeouts

This commit is contained in:
Matias Alejo Garcia 2017-10-26 16:59:50 -03:00
parent 9d6af8cd0e
commit e87521149a
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
2 changed files with 5 additions and 4 deletions

View File

@ -59,6 +59,7 @@ Insight.prototype.getUtxos = function(addresses, cb) {
json: {
addrs: _.uniq([].concat(addresses)).join(',')
},
timeout: 120000,
};
this._doRequest(args, function(err, res, unspent) {

View File

@ -103,17 +103,17 @@ Defaults.SESSION_EXPIRATION = 1 * 60 * 60; // 1 hour to session expiration
Defaults.RateLimit = {
createWallet: {
windowMs: 60 * 60 * 1000, // hour window
delayAfter: 10, // begin slowing down responses after the 3rd request
delayAfter: 8, // begin slowing down responses after the 3rd request
delayMs: 3000, // slow down subsequent responses by 3 seconds per request
max: 20, // start blocking after 20 request
max: 15, // start blocking after 20 request
message: "Too many wallets created from this IP, please try again after an hour"
},
estimateFee: {
windowMs: 60 * 10 *1000, // 10 min window
delayAfter: 10, // begin slowing down responses after the 3rd request
delayAfter: 5, // begin slowing down responses after the 3rd request
delayMs: 300, // slow down subsequent responses by 3 seconds per request
max: 20, // start blocking after 200 request
max: 10, // start blocking after 200 request
message: "Too many request"
},