Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
dabasov committed Nov 15, 2023
1 parent d4821f8 commit 050270f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1,272 deletions.
7 changes: 4 additions & 3 deletions zboxcore/zboxutil/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/0chain/gosdk/core/conf"
"github.com/0chain/gosdk/core/encryption"
"github.com/0chain/gosdk/core/logger"
"github.com/0chain/gosdk/core/util"
"github.com/0chain/gosdk/zboxcore/blockchain"
"github.com/0chain/gosdk/zboxcore/client"
)
Expand Down Expand Up @@ -824,7 +825,7 @@ func MakeSCRestAPICall(scAddress string, relativePath string, params map[string]
lock.Lock()

urlString := fmt.Sprintf("%v/%v%v%v", sharder, SC_REST_API_URL, scAddress, relativePath)
urlObj, err := Parse(urlString)
urlObj, err := util.Parse(urlString)
if err != nil {
log.Error(err)
continue
Expand Down Expand Up @@ -954,11 +955,11 @@ func isCurrentDominantStatus(respStatus int, currentTotalPerStatus map[int]int,
return currentTotalPerStatus[respStatus] == currentMax && (respStatus == 200 || currentTotalPerStatus[200] < currentMax)
}

func joinUrl(baseURl string, paths ...string) (*URL, error) {
func joinUrl(baseURl string, paths ...string) (*util.URL, error) {
lock.Lock()
defer lock.Unlock()

u, err := Parse(baseURl)
u, err := util.Parse(baseURl)
if err != nil {
log.Error(err)
return nil, err
Expand Down
Loading

0 comments on commit 050270f

Please sign in to comment.