Skip to content

Commit c1af74d

Browse files
chore(core-blockchain): remove updateNetworkStatus on Blockchain (#4402)
* chore(core-kernel): remove updateNetworkStatus * chore(core-blockchain): remove updateNetworkStatus * test(core-blockchain): remove updateNetworkStatus
1 parent 14d162d commit c1af74d

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

__tests__/unit/core-blockchain/blockchain.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ describe("Blockchain", () => {
115115
eventDispatcherService.dispatch = jest.fn();
116116

117117
peerNetworkMonitor.cleansePeers = jest.fn();
118-
peerNetworkMonitor.updateNetworkStatus = jest.fn();
119118
peerNetworkMonitor.broadcastBlock = jest.fn();
120119
peerNetworkMonitor.checkNetworkHealth = jest.fn();
121120

@@ -309,16 +308,6 @@ describe("Blockchain", () => {
309308
});
310309
});
311310

312-
describe("updateNetworkStatus", () => {
313-
it("should call updateNetworkStatus on peerNetworkMonitor", () => {
314-
const blockchain = sandbox.app.resolve<Blockchain>(Blockchain);
315-
316-
blockchain.updateNetworkStatus();
317-
318-
expect(peerNetworkMonitor.updateNetworkStatus).toBeCalledTimes(1);
319-
});
320-
});
321-
322311
describe("clearAndStopQueue", () => {
323312
it("should set state.lastDownloadedBlock from this.getLastBlock() and clear queue", async () => {
324313
const blockchain = sandbox.app.resolve<Blockchain>(Blockchain);

packages/core-blockchain/src/blockchain.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,6 @@ export class Blockchain implements Contracts.Blockchain.Blockchain {
173173
this.setWakeUp();
174174
}
175175

176-
// TODO: Check if required
177-
/**
178-
* Update network status.
179-
* @return {void}
180-
*/
181-
public async updateNetworkStatus(): Promise<void> {
182-
await this.networkMonitor.updateNetworkStatus();
183-
}
184-
185176
/**
186177
* Clear and stop the queue.
187178
* @return {void}

packages/core-kernel/src/contracts/blockchain/blockchain.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ export interface Blockchain {
3434
* Reset the wakeup timeout.
3535
*/
3636
resetWakeUp(): void;
37-
/**
38-
* Update network status.
39-
* @return {void}
40-
*/
41-
updateNetworkStatus(): Promise<void>;
4237

4338
/**
4439
* Clear and stop the queue.

0 commit comments

Comments
 (0)