marigold-dev / deku

MIT License
80 stars 16 forks source link

node: fix off-by-one when sending blocks #996

Closed Pilou97 closed 1 year ago

Pilou97 commented 1 year ago

Problem

When a node join the network for the first time it sends a request for blocks above the level 0. But the level 0 is not stored in the Block_storage. As soon as a block is not found the node does no more answer the request.

Solution

When a node receive a request for a block n, it does not look for the block n but starts returning the block n+1