Skip to content

Commit

Permalink
Refactor RPC module
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLord017 authored Sep 27, 2024
1 parent ea9cca1 commit f0f0f36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package utils

import (
"encoding/hex"

"net/url"
"strings"

"bytes"
Expand Down Expand Up @@ -279,3 +279,7 @@ func BranchToNodes(branch []consensus_core.Bytes32) ([][]byte, error) {
}
return nodes, nil
}
func IsURL(str string) bool {
u, err := url.Parse(str)
return err == nil && u.Scheme != "" && u.Host != ""
}

0 comments on commit f0f0f36

Please sign in to comment.