lisk-sdk
lisk-sdk copied to clipboard
Implement syncHandler for handling `getLegacyBlocksFromId ` RPC
Description
Implement syncHandler
method which is being called after receiving getLegacyBlocksFromId
RPC request
- Call
addRateLimit
function on network - Unwrap and decode
data
field coming from the request 2.1 If the above fails then return without processing the request. 2.2 If the "id" doesn't exist then respond with empty list 2.3 If the request data is malformed then ban the peer with 100 penalty score - Check the requested height and get the next 100 blocks
- Wrap the encoded list of blocks within the
data
and respond
Acceptance Criteria
- Should have all the unit tests to test
syncHandler
implementation