new timeouts
This commit is contained in:
parent
9d6af8cd0e
commit
e87521149a
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue