Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Clean up loadBlocksFromNetwork function in modules.loader #2292

Closed
SargeKhan opened this issue Aug 7, 2018 · 1 comment · Fixed by #2555
Closed

Clean up loadBlocksFromNetwork function in modules.loader #2292

SargeKhan opened this issue Aug 7, 2018 · 1 comment · Fixed by #2555
Assignees
Milestone

Comments

@SargeKhan
Copy link
Contributor

Expected behavior

The flow of the function should be more understandable and code should follow proper naming conventions.

Actual behavior

The function adds a lot of obscurity in the understanding of the functionality, it jumps control flow in multiple ways and is missing useful comments.

Steps to reproduce

Look at function implementation

Which version(s) does this affect? (Environment, OS, etc...)

All versions.

@MaciejBaj
Copy link
Contributor

The syncing process refactor will be tackled separately. Right now it's not clear how it behaves, like sending ids of "first 5 blocks of (n) last rounds, descending order" through rpc.blocksCommon but establishing if nodes are sharing the same chain only by checking the first one of them:
https://github.com/LiskHQ/lisk/blob/development/modules/transport.js#L528.
Functionalities of sync process will be revisited and the corresponding issue will be opened. This issue is suspended for now and will become a part of the bigger sync refactor not to waste the efforts for cleaning up the function that might potentially be replaced in the near future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants