Anton Kaliaev
f965a4db15
ListOfKnownAddresses is removed panic if addrbook size is less than zero CrawlPeers does not attempt to connect to existing or peers we're currently dialing various perf. fixes improved tests (though not complete) move IsDialingOrExistingAddress check into DialPeerWithAddress (Fixes #2716) * addrbook: preallocate memory when saving addrbook to file * addrbook: remove oldestFirst struct and check for ID * oldestFirst replaced with sort.Slice * ID is now mandatory, so no need to check * addrbook: remove ListOfKnownAddresses GetSelection is used instead in seed mode. * addrbook: panic if size is less than 0 * rewrite addrbook#saveToFile to not use a counter * test AttemptDisconnects func * move IsDialingOrExistingAddress check into DialPeerWithAddress * save and cleanup crawl peer data * get rid of DefaultSeedDisconnectWaitPeriod * make linter happy * fix TestPEXReactorSeedMode * fix comment * add a changelog entry * Apply suggestions from code review Co-Authored-By: melekes <anton.kalyaev@gmail.com> * rename ErrDialingOrExistingAddress to ErrCurrentlyDialingOrExistingAddress * lowercase errors * do not persist seed data pros: - no extra files - less IO cons: - if the node crashes, seed might crawl a peer too soon * fixes after Ethan's review * add a changelog entry * we should only consult Switch about peers checking addrbook size does not make sense since only PEX reactor uses it for dialing peers! https://github.com/tendermint/tendermint/pull/3011#discussion_r270948875 |
6 years ago | |
---|---|---|
.. | ||
addrbook.go | p2p: seed mode refactoring (#3011) | 6 years ago |
addrbook_test.go | p2p: refactor GetSelectionWithBias for addressbook (#3475) | 6 years ago |
errors.go | p2p: AddressBook requires addresses to have IDs; Do not close conn immediately after sending pex addrs in seed mode (#2797) | 6 years ago |
file.go | p2p: seed mode refactoring (#3011) | 6 years ago |
known_address.go | p2p: seed mode refactoring (#3011) | 6 years ago |
params.go | fix build and test | 7 years ago |
pex_reactor.go | p2p: seed mode refactoring (#3011) | 6 years ago |
pex_reactor_test.go | p2p: seed mode refactoring (#3011) | 6 years ago |
wire.go | alias amino imports (#3219) | 6 years ago |