simplify code by removing extraneous conversion to multiaddr

just Cast to verify correctness and panic if something is wrong
This commit is contained in:
vyzo 2020-06-26 12:16:36 +03:00
parent 16149b9198
commit a612b77cee

View File

@ -65,8 +65,8 @@ func preparePubsubTracer(t *TestEnvironment) (*PubsubTracer, error) {
tracedMultiaddrStr := fmt.Sprintf("%s/p2p/%s", tracedAddr, host.ID())
t.RecordMessage("I am %s", tracedMultiaddrStr)
tracedMultiaddr := ma.StringCast(tracedMultiaddrStr)
tracedMsg := &PubsubTracerMsg{Tracer: tracedMultiaddr.String()}
_ = ma.StringCast(tracedMultiaddrStr)
tracedMsg := &PubsubTracerMsg{Tracer: tracedMultiaddrStr}
t.SyncClient.MustPublish(ctx, pubsubTracerTopic, tracedMsg)
t.RecordMessage("waiting for all nodes to be ready")