added after for real
@@ -23,7 +23,6 @@ func createP2pInstance(t testing.TB, config config.Config) *swarm {
}
type P2PSwarm struct {
-
before func(s *swarm)
after func(s *swarm)
@@ -38,7 +37,6 @@ func testLog(text string, args ...interface{}) {
fmt.Println("################################################################################################")
}
-
func NewP2PSwarm(before func(s *swarm), after func(s *swarm)) *P2PSwarm {
p2ps := new(P2PSwarm)
p2ps.before = before
@@ -82,6 +80,9 @@ func (p2ps *P2PSwarm) Start(t testing.TB, bootnodes int, networksize int, randco
swarm[i].Start()
swarm[i].waitForBoot()
wg.Done()
+ if p2ps.after != nil {
+ p2ps.after(swarm[i])
+ }
}()
}
