Fix a bug where peers are returning lower headers than current own height. This almost happens if less than the 512 headers need to be returned by peer.
Type of change
[ x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Chore (miscellaneous changes e.g. modifying .gitignore)
[ ] Build (Affect build components like build tool, ci pipeline, dependencies, project version)
Fix a bug where peers are returning lower headers than current own height. This almost happens if less than the 512 headers need to be returned by peer.
Type of change