Merge pull request #908 from embark-framework/bugfix/warn-about-ethereum-node-going-away

Warn about Ethereum node going away
This commit is contained in:
Iuri Matias 2018-09-26 09:25:35 -04:00 committed by GitHub
commit 06c0171c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -100,14 +100,14 @@ class BlockchainConnector {
registerEvents() { registerEvents() {
const self = this; const self = this;
self.events.on('check:wentOffline:Ethereum', () => { self.events.on('check:wentOffline:Ethereum', () => {
self.logger.trace('Ethereum went offline: stopping web3 provider...'); self.logger.warn('Ethereum went offline: stopping web3 provider...');
self.provider.stop(); self.provider.stop();
// once the node goes back online, we can restart the provider // once the node goes back online, we can restart the provider
self.events.once('check:backOnline:Ethereum', () => { self.events.once('check:backOnline:Ethereum', () => {
self.logger.trace('Ethereum back online: starting web3 provider...'); self.logger.warn('Ethereum back online: starting web3 provider...');
self.provider.startWeb3Provider(() => { self.provider.startWeb3Provider(() => {
self.logger.trace('web3 provider restarted after ethereum node came back online'); self.logger.warn('web3 provider restarted after ethereum node came back online');
}); });
}); });
}); });