Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 3b996a2

Browse files
committed
Log info when getting network info failed
1 parent a6481d0 commit 3b996a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/action/info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class InfoAction {
2626
const response = await this._grpc.sendCommand('getNetworkInfo');
2727
this._store.numNodes = response.num_nodes;
2828
} catch (err) {
29-
log.error('Getting network info failed', err);
29+
log.info('Getting network info failed', err);
3030
}
3131
}
3232

test/unit/action/info.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Action Info Unit Tests', () => {
4141
it('should log error on failure', async () => {
4242
grpc.sendCommand.rejects();
4343
await info.getNetworkInfo();
44-
expect(logger.error, 'was called once');
44+
expect(logger.info, 'was called once');
4545
});
4646
});
4747

@@ -80,7 +80,7 @@ describe('Action Info Unit Tests', () => {
8080
grpc.sendCommand.withArgs('getNetworkInfo').rejects(new Error('Boom!'));
8181
const synced = await info.getInfo();
8282
expect(synced, 'to be', false);
83-
expect(logger.error, 'was called once');
83+
expect(logger.info, 'was called twice');
8484
});
8585

8686
it('should return false if chain is synced but not filter headers', async () => {

0 commit comments

Comments
 (0)