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:
commit
06c0171c39
|
@ -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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue