From fa4dc4bde5035c02543ee18d9074620263ab91d0 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 11 Jul 2022 16:31:31 +0430 Subject: [PATCH 1/5] add skip autotransport condition --- pkg/visor/init.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/visor/init.go b/pkg/visor/init.go index bcb77aca3..089c97551 100644 --- a/pkg/visor/init.go +++ b/pkg/visor/init.go @@ -486,6 +486,14 @@ func getRouteSetupHooks(ctx context.Context, v *Visor, log *logging.Logger) []ro retrier := netutil.NewRetrier(log, time.Second, time.Second*20, 3, 1.3) return []router.RouteSetupHook{ func(rPK cipher.PubKey, tm *transport.Manager) error { + establishedTransports, _ := v.Transports([]string{string(network.STCPR), string(network.SUDPH), string(network.DMSG)}, []cipher.PubKey{v.conf.PK}, false) //nolint + for _, transportSum := range establishedTransports { + if transportSum.Remote.Hex() == rPK.Hex() { + log.Info("Established transport available") + return nil + } + } + allTransports, err := v.arClient.Transports(ctx) if err != nil { log.WithError(err).Warn("failed to fetch AR transport") From dbb7d6a41fe485542c3f2c5d8edd9ad5b85cea81 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 11 Jul 2022 16:43:06 +0430 Subject: [PATCH 2/5] change log from info to debug --- pkg/visor/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/visor/init.go b/pkg/visor/init.go index 089c97551..8bed24c7a 100644 --- a/pkg/visor/init.go +++ b/pkg/visor/init.go @@ -489,7 +489,7 @@ func getRouteSetupHooks(ctx context.Context, v *Visor, log *logging.Logger) []ro establishedTransports, _ := v.Transports([]string{string(network.STCPR), string(network.SUDPH), string(network.DMSG)}, []cipher.PubKey{v.conf.PK}, false) //nolint for _, transportSum := range establishedTransports { if transportSum.Remote.Hex() == rPK.Hex() { - log.Info("Established transport available") + log.Debugf("Established transport exist. Type: %s", transportSum.Type) return nil } } From bc3a1d9c56985e0838c9ba7eae2294e0d7fa6a59 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 11 Jul 2022 17:02:03 +0430 Subject: [PATCH 3/5] go mod tidy | go mod vendor --- go.sum | 4 ---- 1 file changed, 4 deletions(-) diff --git a/go.sum b/go.sum index f3795d616..a63c94db4 100644 --- a/go.sum +++ b/go.sum @@ -474,8 +474,6 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/skycoin/dmsg v0.0.0-20220617100223-c17f98a92a47 h1:d/KdILjeiZOj3QFOm8KkOwIr5wwx9zWCl+oGVXPln1o= -github.com/skycoin/dmsg v0.0.0-20220617100223-c17f98a92a47/go.mod h1:7ixxeJVjbe3lxDkI4Yizj/TWoafYxs8cPJfxjlDeG+w= github.com/skycoin/dmsg v0.0.0-20220704102949-fece1bd9c40c h1:v7d+0yOp066U8FmcUdQ0Nh9Q+qshBO7+w3ZybGJlBnk= github.com/skycoin/dmsg v0.0.0-20220704102949-fece1bd9c40c/go.mod h1:7ixxeJVjbe3lxDkI4Yizj/TWoafYxs8cPJfxjlDeG+w= github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0duwyG+7WliWz5u9kgk1h5MnLuA= @@ -483,8 +481,6 @@ github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:UXghlricA7 github.com/skycoin/skycoin v0.27.1 h1:HatxsRwVSPaV4qxH6290xPBmkH/HgiuAoY2qC+e8C9I= github.com/skycoin/skycoin v0.27.1/go.mod h1:78nHjQzd8KG0jJJVL/j0xMmrihXi70ti63fh8vXScJw= github.com/skycoin/skywire-utilities v0.0.0-20220617085111-5c8c8d3ced14/go.mod h1:B63p56igl38Ha+zjqi26d2om6XEe9jozwB6kzAWMnm0= -github.com/skycoin/skywire-utilities v0.0.0-20220630144749-6ea8913bf1e8 h1:xUPi4duqObtDt4BYiNhbwssiUOFTor67Nftqx1F6/uc= -github.com/skycoin/skywire-utilities v0.0.0-20220630144749-6ea8913bf1e8/go.mod h1:B63p56igl38Ha+zjqi26d2om6XEe9jozwB6kzAWMnm0= github.com/skycoin/skywire-utilities v0.0.0-20220706133229-02cc62ac2323 h1:W+LSTySKEg3/UyVZXziQYyIdIo66g28VuKBk7sl0718= github.com/skycoin/skywire-utilities v0.0.0-20220706133229-02cc62ac2323/go.mod h1:B63p56igl38Ha+zjqi26d2om6XEe9jozwB6kzAWMnm0= github.com/skycoin/systray v1.10.1-0.20220630135132-48d2a1fb85d8 h1:2IA2Iw6rgNpbd/rogzBbmNpfGLPhf9zYE68RY8CmU4k= From 93a7e1b2d1ffe503c926f0635fe439e1cc6055f7 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Mon, 11 Jul 2022 17:23:26 +0430 Subject: [PATCH 4/5] upgrade appveyor go to 1.17.11 --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index f405202e2..5f9cef4fc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ version: "{build}" -stack: node 16.8.0 +stack: node 16.8.0, go 1.17.11 environment: matrix: From a9f914fd6fa1302694219066a8b54087e37381c8 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 27 Jul 2022 14:00:29 +0430 Subject: [PATCH 5/5] delete go version from appveyor config --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8f49a0472..e2c41a0f0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ version: "{build}" -stack: node 16.8.0, go 1.17.11 +stack: node 16.8.0 environment: matrix: