Skip to content

Commit

Permalink
Remove time sleep workaround in router RPC gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Nov 28, 2019
1 parent f11e065 commit 2992171
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
27 changes: 0 additions & 27 deletions pkg/router/rpc_gateway.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package router

import (
"time"

"github.com/SkycoinProject/skycoin/src/util/logging"

"github.com/SkycoinProject/skywire-mainnet/pkg/routing"
Expand All @@ -29,31 +27,6 @@ func (r *RPCGateway) AddEdgeRules(rules routing.EdgeRules, ok *bool) error {
return routing.Failure{Code: routing.FailureAddRules, Msg: err.Error()}
}

time.Sleep(1 * time.Second)

/*r.logger.Infof("Adding Edge rules: forward: %s, reverse: %s", rules.Forward, rules.Reverse)
if err := r.router.SaveRoutingRules(rules.Forward, rules.Reverse); err != nil {
*ok = false
r.logger.WithError(err).Warnf("Request completed with error.")
return routing.Failure{Code: routing.FailureAddRules, Msg: err.Error()}
}
router, assertOk := r.router.(*router)
if !assertOk {
panic("Wrong router type")
}
router.saveRouteGroupRules(rules)*/

/*if err := r.router.SaveRoutingRules(rules.Forward, rules.Reverse); err != nil {
*ok = false
r.logger.WithError(err).Warnf("Request completed with error.")
return routing.Failure{Code: routing.FailureAddRules, Msg: err.Error()}
}*/

*ok = true

return nil
Expand Down
2 changes: 0 additions & 2 deletions vendor/github.com/SkycoinProject/dmsg/disc/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2992171

Please sign in to comment.