controllers - recent-blocks - wrap block-tracker event in try-catch

feature/default_network_editable
kumavis 7 years ago
parent dc96b1eb93
commit ee800de025
  1. 8
      app/scripts/controllers/recent-blocks.js

@ -34,7 +34,13 @@ class RecentBlocksController {
}, opts.initState)
this.store = new ObservableStore(initState)
this.blockTracker.on('latest', this.processBlock.bind(this))
this.blockTracker.on('latest', async (newBlockNumberHex) => {
try {
await this.processBlock(newBlockNumberHex)
} catch (err) {
log.error(err)
}
})
this.backfill()
}

Loading…
Cancel
Save