besu
besu copied to clipboard
Refactor and fix retrying get block switching peer
PR description
RetryingGetBlockFromPeersTask had a problem that prevented to complete when all the peers fail, and that also had the consequence to not removing the failed requested block from the internal caches in BlockPropagationManager, that could cause a stall since that block will to be tried to be retrieved again.
Made also an abstraction of a retrying peer task that tries a different peer on every execution, so it can used also for other tasks
Fixed Issue(s)
Documentation
- [x] I thought about documentation and added the
doc-change-requiredlabel to this PR if updates are required.
Changelog
- [x] I thought about the changelog and included a changelog update if required.