|
|
@ -4,8 +4,8 @@ const PhishingDetector = require('eth-phishing-detect/src/detector') |
|
|
|
|
|
|
|
|
|
|
|
// compute phishing lists
|
|
|
|
// compute phishing lists
|
|
|
|
const PHISHING_DETECTION_CONFIG = require('eth-phishing-detect/src/config.json') |
|
|
|
const PHISHING_DETECTION_CONFIG = require('eth-phishing-detect/src/config.json') |
|
|
|
// every ten minutes
|
|
|
|
// every four minutes
|
|
|
|
const POLLING_INTERVAL = 10 * 60 * 1000 |
|
|
|
const POLLING_INTERVAL = 4 * 60 * 1000 |
|
|
|
|
|
|
|
|
|
|
|
class BlacklistController { |
|
|
|
class BlacklistController { |
|
|
|
|
|
|
|
|
|
|
@ -41,6 +41,7 @@ class BlacklistController { |
|
|
|
|
|
|
|
|
|
|
|
scheduleUpdates () { |
|
|
|
scheduleUpdates () { |
|
|
|
if (this._phishingUpdateIntervalRef) return |
|
|
|
if (this._phishingUpdateIntervalRef) return |
|
|
|
|
|
|
|
this.updatePhishingList() |
|
|
|
this._phishingUpdateIntervalRef = setInterval(() => { |
|
|
|
this._phishingUpdateIntervalRef = setInterval(() => { |
|
|
|
this.updatePhishingList() |
|
|
|
this.updatePhishingList() |
|
|
|
}, POLLING_INTERVAL) |
|
|
|
}, POLLING_INTERVAL) |
|
|
|