Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the direction is descending, prune from start. (#2662)
A block request contain start block, end block, direction and max size. It could be the case that block between start and end are less than max size. In such cases, so far we were pruning block from the end while preparing a block response. The correct way however would be to prune from the start, if the direction is descending and prune from the end if the direction is ascending. Since, we were pruning blocks the wrong way, we were preparing a response which substrate was not expecting. And that used to result in substrate dropping us. This commit fixes that issue. Fixes #2595
- Loading branch information