Skip to content

Commit

Permalink
Michiel/slashing monitoring filter (#875)
Browse files Browse the repository at this point in the history
* Add filter for cosmos based networks for slashing notifications

* changelog
  • Loading branch information
michielmulders authored Jun 2, 2020
1 parent b3f7c20 commit 561b4d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/michiel_slashing-monitoring-filter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Changed] Only run slahsing monitor for cosmos based networks @michielmulders
8 changes: 6 additions & 2 deletions lib/network-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ class NetworkContainer {
this.db = createDBInstance(network.id)
this.requireSourceClass()
this.requireSubscriptionClass()
this.slashingMonitor = new SlashingMonitor(network.id, network.rpc_url)

if (network.network_type === 'cosmos')
this.slashingMonitor = new SlashingMonitor(network.id, network.rpc_url)
}

initialize() {
this.createStore()
this.createBlockListener()
this.createFiatValuesAPI()
this.slashingMonitor.initialize()

if (this.network.network_type === 'cosmos')
this.slashingMonitor.initialize()
}

createStore() {
Expand Down

0 comments on commit 561b4d0

Please sign in to comment.