aboutsummaryrefslogtreecommitdiffstats
path: root/lib/providermanager.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/providermanager.js')
-rw-r--r--lib/providermanager.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/providermanager.js b/lib/providermanager.js
index 28122cb42..00266154d 100644
--- a/lib/providermanager.js
+++ b/lib/providermanager.js
@@ -28,7 +28,15 @@ if (process.env.NODE_ENV !== 'build') {
var web3 = require('./web3'); // jshint ignore:line
}
-/// Provider manager object prototype
+/**
+ * Provider manager object prototype
+ * It's responsible for passing messages to providers
+ * If no provider is set it's responsible for queuing requests
+ * It's also responsible for polling the ethereum node for incoming messages
+ * Default poll timeout is 12 seconds
+ * If we are running ethereum.js inside ethereum browser, there are backend based tools responsible for polling,
+ * and provider manager polling mechanism is not used
+ */
var ProviderManager = function() {
this.queued = [];
this.polls = [];
@@ -111,3 +119,4 @@ ProviderManager.prototype.stopPolling = function (pollId) {
};
module.exports = ProviderManager;
+