remove .Type() now that we have singletons for repos

This commit is contained in:
Anton Evangelatov 2022-03-07 13:00:26 +01:00
parent b9fe61f9da
commit 7cdf6dc680

View File

@ -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 {