-
Notifications
You must be signed in to change notification settings - Fork 838
Simplify gossip tests #4547
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
Simplify gossip tests #4547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the gossip test infrastructure by moving test helpers from production code into test files and simplifying their implementation. The changes remove unused test utilities and improve code organization by using more specific types instead of wrapper structs.
Key changes:
- Moved test helper types (
testTx,testSet,testMarshaller,NoOpGossiper,TestGossiper,FullSet) from production files to test files - Simplified test helper implementation by using type aliases and function types instead of struct wrappers
- Removed unused test helpers that had no external usage
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| network/p2p/gossip/test_gossip.go | Deleted file containing test helpers that are now defined in test files |
| network/p2p/gossip/handler.go | Updated interface assertion to use the Gossipable interface instead of concrete test type |
| network/p2p/gossip/gossip_test.go | Added test helper types (tx, marshaller, setDouble, gossiperFunc, fullSet) previously defined in production code |
| network/p2p/gossip/gossip.go | Removed test helper types (NoOpGossiper, TestGossiper, FullSet) and updated interface assertions |
| network/p2p/gossip/bloom_test.go | Updated test data to use simplified tx type alias |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
hold off until repo merger is done |
Why this should be merged
testisn't really needed if it is defined in a test file.NoOpGossiperandFullSet.Gossip.How this works
Just cleanup, no functional changes.
How this was tested
CI
Need to be documented in RELEASES.md?
No.