HomePhabricator

seeder: don't ignore connection errors

Description

seeder: don't ignore connection errors

Summary:
In D11005 the seeder behavior was accidentally changed. As a result, nodes with connections errors or connections closed prematurely while sending a message could be flagged as good if the sock pointer was created successfully and if the node was not banned by the message processing logic for a previous message.

This fixes the logic to not overwrite the res flag when the sock pointer is not null but there was a connection error while receiving the data just before processing messages.
It restores the behavior that was applied before D11005.

Test Plan:

ninja bitcoin-seeder check-seeder
./src/seeder/bitcoin-seeder

This is only a sanity check that the seeder still works. The connection and network communication logic is hard to test.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11460

Details

Provenance
PiRKAuthored on May 13 2022, 14:26
PiRKPushed on May 14 2022, 10:10
Reviewer
Restricted Project
Differential Revision
D11460: seeder: don't ignore connection errors
Parents
rABC56818345a7d9: [avalanche] Rename the ProofComparator
Branches
Unknown
Tags
Unknown