Skip to content

Commit

Permalink
remove .Type() now that we have singletons for repos
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Mar 7, 2022
1 parent b9fe61f commit 7cdf6dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ var LibP2P = Options(
)

func IsType(t repo.RepoType) func(s *Settings) bool {
return func(s *Settings) bool { return s.nodeType.Type() == t.Type() }
return func(s *Settings) bool { return s.nodeType == t }
}

func isFullOrLiteNode(s *Settings) bool { return s.nodeType.Type() == repo.FullNode.Type() }
func isFullOrLiteNode(s *Settings) bool { return s.nodeType == repo.FullNode }
func isFullNode(s *Settings) bool {
return s.nodeType.Type() == repo.FullNode.Type() && !s.Lite
return s.nodeType == repo.FullNode && !s.Lite
}
func isLiteNode(s *Settings) bool {
return s.nodeType.Type() == repo.FullNode.Type() && s.Lite
return s.nodeType == repo.FullNode && s.Lite
}

func Base() Option {
Expand Down

0 comments on commit 7cdf6dc

Please sign in to comment.