Page MenuHomePhabricator

seeder: don't ignore connection errors
ClosedPublic

Authored by PiRK on May 13 2022, 14:35.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCf5925ad5ae5f: 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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable