-
Notifications
You must be signed in to change notification settings - Fork 112
Leaner swarm/network and p2p/simulations #1076
Commits on Dec 24, 2018
-
swarm/network: remove unused opts param of AddNodes* function
Only AddNode() had some valid use cases for AddNodeOption, but yet the params were propagated everywhere.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 44a9741 - Browse repository at this point
Copy the full SHA 44a9741View commit details -
p2p/simulations: add more test cases for ConnectNodesFull()
As I surprised myself it works even with 0 or 1 nodes.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for b407261 - Browse repository at this point
Copy the full SHA b407261View commit details -
swarm/network: remove AddNodesAndConnectFull() method
Added no useful functionality as it was just combining 2 simple methods and the function was only used in its own test.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for eec450b - Browse repository at this point
Copy the full SHA eec450bView commit details -
swarm/network: remove AddNodesAndConnectStar() method
The method was used only its own test.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for a899495 - Browse repository at this point
Copy the full SHA a899495View commit details -
p2p/simulations: remove everything related to pivot from connect.go
As the concept and the related functionality was not used anywhere.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 248b46e - Browse repository at this point
Copy the full SHA 248b46eView commit details -
p2p/simulations: remove unused Err and private method
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 9d76ab0 - Browse repository at this point
Copy the full SHA 9d76ab0View commit details -
swarm/network: remove everything related to pivot from Simulation
As the concept and the related functionality was not used anywhere.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 28cdb50 - Browse repository at this point
Copy the full SHA 28cdb50View commit details -
swarm/network: remove unused Start/StopRandomNode()
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 7c8b0b8 - Browse repository at this point
Copy the full SHA 7c8b0b8View commit details -
swarm/network: remove unused AddNodeWithMsgEvents()
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 9a6ea0d - Browse repository at this point
Copy the full SHA 9a6ea0dView commit details -
swarm/network: remove unused AddNodeWithService()
That also makes AddNodeOption type and the AddNode's AddNodeOptions parameter unnecessary.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 242cd7b - Browse repository at this point
Copy the full SHA 242cd7bView commit details -
swarm/network: remove unused Start/StopNode()
As we can just call Stop() on Network.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 2808be2 - Browse repository at this point
Copy the full SHA 2808be2View commit details -
swarm/network: remove AddNodesAndConnectRing() method
The utility of this function was very low. The method just combined two simple calls into one and was used in only one place. Note: verifyRing() now can be private.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for 5decff8 - Browse repository at this point
Copy the full SHA 5decff8View commit details -
swarm/network: remove AddNodesAndConnectChain() method
This was the lat mixed responsibility function in node.go, i.e., not just adding but connecting nodes. As the responsibility of connecting nodes belongs to p2p/simulations/connect.go I removed the method. Note: there was just one complex use case for AddNodesAndConnectChain in testSwarmNetwork where we actually added nodes more than once and we still wanted to keep them in chain topology. There I introduced a test helper function.
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for fa98d4e - Browse repository at this point
Copy the full SHA fa98d4eView commit details -
swarm/network: fix unused method parameters inspections
Ferenc Szabo committedDec 24, 2018 Configuration menu - View commit details
-
Copy full SHA for fc44737 - Browse repository at this point
Copy the full SHA fc44737View commit details
Commits on Dec 26, 2018
-
p2p/simulations: drop unused Connect* methods from connect.go
The deleted methods were all unused. So I don't want to maintain them during refactor.
Ferenc Szabo committedDec 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 999f79a - Browse repository at this point
Copy the full SHA 999f79aView commit details -
p2p/simulations: fix code inspection problems
- typos - unused global variable - unused function parameters - redundant import alias - code style issue: snake case
Ferenc Szabo committedDec 26, 2018 Configuration menu - View commit details
-
Copy full SHA for b56ecc2 - Browse repository at this point
Copy the full SHA b56ecc2View commit details -
swarm/network: fix code inspection problems
- typos - redundant import alias
Ferenc Szabo committedDec 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 75eeaa0 - Browse repository at this point
Copy the full SHA 75eeaa0View commit details
Commits on Dec 28, 2018
-
swarm/network: bring back AddNodeOption for AddNode()
During my code cleanup efforts I removed the AddNodeOption type and related functionality. As that was not used anywhere. However, during code review I was asked to bring back the functionality. Here I'm doing that; still, I would prefer to follow YAGNI.
Ferenc Szabo committedDec 28, 2018 Configuration menu - View commit details
-
Copy full SHA for 93c5c3f - Browse repository at this point
Copy the full SHA 93c5c3fView commit details