Page MenuHomePhabricator

Numerous improvement to the seeder's code
ClosedPublic

Authored by deadalnix on Sep 26 2017, 19:15.

Details

Summary
  • unsigned char => uint8_t
  • C++ style imprts
  • project import before library imports
  • Relocate some comments for better layout
  • Reorder inline and static qualifiers
  • Remove blanket namespace imports
  • Upgrade some of the loops for C++11 style loops
Test Plan

Compile and run the seeder.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
seederimprove
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 901
Build 901: arc lint + arc unit

Event Timeline

Also take care of standalone headers

src/seeder/bitcoin.cpp
26

don't we usually got to a new line also if the then branch is a one-liner?

src/seeder/main.cpp
439

don't recall BU having a cash seeder for the testnet

src/seeder/netbase.cpp
835

why not uint something?

src/seeder/serialize.h
135

unsigned int?
(same question for all the belove)

sickpig requested changes to this revision.Sep 27 2017, 15:52
This revision now requires changes to proceed.Sep 27 2017, 15:52
deadalnix edited edge metadata.
deadalnix added inline comments.
src/seeder/bitcoin.cpp
26

We do whatever the formatter does.

src/seeder/main.cpp
439

It's in ABC's source code. Someone must have given us this address.

src/seeder/netbase.cpp
835

I don't know, it was an int and it is still an int :)

src/seeder/serialize.h
135

We aren't sending message more than 4Gb anyway so it doesn't matter. Plus the whole serialization code is trashed in another diff.

src/seeder/bitcoin.cpp
26

fair point.

hope that clang-format does not develop an evil form of AI otherwise... 😄

src/seeder/main.cpp
439

copying something wrong doesn't making correct magically

just checked there's no testnet-seed.bitcoinunlimited.info.

if it has being taken from other part of the ABC's that means that there's another place in the code to fix.

src/seeder/netbase.cpp
835

fair

src/seeder/serialize.h
135

fair

src/seeder/main.cpp
439
This revision is now accepted and ready to land.Sep 28 2017, 19:46
This revision was automatically updated to reflect the committed changes.