Page MenuHomePhabricator

Fix various bugs in the seeder.
ClosedPublic

Authored by deadalnix on Wed, Nov 21, 15:07.

Details

Summary
  • fix fubared logs format
  • Ensure that the main logger dump on the console just like the rest of the seeder does.
  • Ensure connections to new nodes are etablished properly.
Test Plan

Run the seeder manually, ensure it starts crawling the network and that the log look much better.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Wed, Nov 21, 15:07
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Nov 21, 15:07
deadalnix updated this revision to Diff 5979.Wed, Nov 21, 15:23

Also close sockets properly

Fabien requested changes to this revision.Thu, Nov 22, 00:43
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/seeder/main.cpp
426 ↗(On Diff #5979)

You may want to print line by line instead, because the logs and the loop print overlap giving some weird output to the console

This revision now requires changes to proceed.Thu, Nov 22, 00:43
deadalnix requested review of this revision.Thu, Nov 22, 01:59
deadalnix marked an inline comment as done.
deadalnix added inline comments.
src/seeder/main.cpp
426 ↗(On Diff #5979)

That is what the \n a few line bellow is doing.

schancel edited the summary of this revision. (Show Details)Thu, Nov 22, 08:23
Fabien added inline comments.Thu, Nov 22, 08:46
src/seeder/main.cpp
426 ↗(On Diff #5979)

This does not seem to be sufficient. I suppose other logs can be printed in another thread ? I ended up with lines like this :

NS requests, 0 db queriesct() to [<ip>]:8333 failed: Netwo

on a standard 80 char terminal or

2018-11-22 00:35:13 connect() to <ip>:8333 failed after select(): Connection refused (111)nreachable (101)

on a larger one

Fabien accepted this revision.Thu, Nov 22, 16:13

Accept to allow fixing the functional issue

This revision is now accepted and ready to land.Thu, Nov 22, 16:13
This revision was automatically updated to reflect the committed changes.