Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tbcd: clean up peer and peermanager #273

Merged
merged 21 commits into from
Oct 11, 2024
Merged

Conversation

marcopeereboom
Copy link
Contributor

@marcopeereboom marcopeereboom commented Oct 3, 2024

Summary
Peer manager is currently a turd because it was part of the server struct and got adulterated over time.

Changes
Clean up this mess by making it a full citizen.

Fixes #214

@marcopeereboom marcopeereboom added the area: tbc This is a change to TBC (Tiny Bitcoin) label Oct 3, 2024
@marcopeereboom marcopeereboom requested a review from a team as a code owner October 3, 2024 11:31
@marcopeereboom marcopeereboom changed the title Cleaning up peer and peermanager Clean up peer and peermanager Oct 3, 2024
@joshuasing joshuasing marked this pull request as draft October 3, 2024 15:30
@marcopeereboom marcopeereboom force-pushed the marco/peermanageragain branch from 0d816cb to f00c034 Compare October 3, 2024 17:19
service/tbc/peer.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
@marcopeereboom marcopeereboom marked this pull request as ready for review October 10, 2024 17:43
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
service/tbc/peer_manager.go Outdated Show resolved Hide resolved
@joshuasing joshuasing changed the title Clean up peer and peermanager tbtcd: clean up peer and peermanager Oct 11, 2024
@joshuasing joshuasing changed the title tbtcd: clean up peer and peermanager tbcd: clean up peer and peermanager Oct 11, 2024
@joshuasing joshuasing added type: refactor This refactors existing functionality status: breaking This is a breaking and non-backwards compatible change size: XL This change is very large (+/- <1000) labels Oct 11, 2024
@marcopeereboom marcopeereboom merged commit 88ca612 into main Oct 11, 2024
6 checks passed
@marcopeereboom marcopeereboom deleted the marco/peermanageragain branch October 11, 2024 15:31
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
* Start cleaning up peer and peermanager

* Rewrite a new peer manager

* Make new peer manager mostly work

* Please linter

* Add some prometheus crap

* bring back reset clause

* Make peer manager parallel

* This seems to make providing seeds work correctly

* Missing defer in mutex, thanks Joshua

* Remove debug

* Joshua suggestions

* Catch up to go 1.23 to get nifty new tcp dial options and fix tests

* Fix test

* Bring back ping all peers

* Deal with signals

* fix seeding, don't run test that connects to testnet3

* fix make race; do not use same host and port for each test

* Make it the same as bssd

* Oops, forgot to commit this

* sundry joshua nits

* Fix error

---------

Co-authored-by: ClaytonNorthey92 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tbc This is a change to TBC (Tiny Bitcoin) size: XL This change is very large (+/- <1000) status: breaking This is a breaking and non-backwards compatible change type: refactor This refactors existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Header dowloads can stall
3 participants