lisk-sdk icon indicating copy to clipboard operation
lisk-sdk copied to clipboard

Manage node to sync legacy blocks in the start of the node

Open ishantiw opened this issue 2 years ago • 0 comments

Description

Manage node to sync legacy blocks in the start of the node (can be disabled with a flag within legacy). Disable block processing (maybe a flag on receiving a block from the network to ignore when we are syncing legacy blocks)

  • In case the legacy.sync flag from the config is false then simply skip the below step
  • We can call legacyChainHandler.sync and await after network.start in the engine.start so we don't have to manage sync flag and emitting event for syncing legacy blocks
  • ~~Pass legacyChainHandler to consensus so that when consensus calls network.applyNodeInfo it can pass current legacy blocks~~ Since we can apply partial nodeInfo we don't have this requirement

Acceptance Criteria

  • Should have unit tests covering the solution

ishantiw avatar Sep 07 '22 15:09 ishantiw