Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eth/downloader: fix downloadTesterPeer to use fake TD
.*Starvation.* tests were failing because errStallingPeer was expected but no error received. The TD is advertised and assigned to the downloader as expected, but the handshake with the peer's Head method was causing the reassignment of the downloader.td field to the actual (honest) TD value by virtue of the virtuous dlp.Head method, which returned the actual chain TD. This caused the tests to fail because the sync TD was not the fake one. So this patch provides a field in the tester peer type to actually handle lying about TD, which then make the errStallingPeer error get returned. Date: 2023-05-17 07:27:56-07:00 Signed-off-by: meows <b5c6@protonmail.com>
- Loading branch information