efsn
efsn copied to clipboard
eth/downloader: not fetch older peer
Seems there's no point trying to fetch a peer whose td is smaller.
Not sure the change is needed or not. Because before fetch the part, the downloader already check the peer's TD, if less than local, it will drop the peers.
BTW, the eth/downloader module was forked from ethereum, I didn't see the same logic on the their side.
Not sure the change is needed or not. Because before fetch the part, the downloader already check the peer's TD, if less than local, it will drop the peers.
BTW, the eth/downloader module was forked from ethereum, I didn't see the same logic on the their side.
Hopefully this PR will fix an issue I met: I set up two nodes, one(call it A) only connects to the other(call it B), while B connects to others via bootstrap nodes. I saw A often disconnected by B when chosen as an idle peer to fetch from.
I will try to reproduce the issue later, see if the issue fixed by this pr or not
Have you tried to add the Node B as a static node in Node A's peer list?
Have you tried to add the Node B as a static node in Node A's peer list?
Yes,A has B in static peer list, and disabled discovery so it only connects B.