Skip to content

Commit d78617d

Browse files
Upgrade 0Chain GoSDK to v1.8.11 (#898)
* upgrade GoSDK to v1.8.11 * fix(zcncore): removed unused GetBlobbers * chore(gomod): upgraded deps Co-authored-by: service-0chain <[email protected]> Co-authored-by: Lz <[email protected]>
1 parent f6777ca commit d78617d

File tree

3 files changed

+89
-110
lines changed

3 files changed

+89
-110
lines changed

code/go/0chain.net/blobbercore/handler/zcncore.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package handler
22

33
import (
4-
"encoding/json"
54
"sync"
65

76
"github.com/0chain/blobber/code/go/0chain.net/core/common"
@@ -70,32 +69,6 @@ func CheckBalance() (float64, error) {
7069
return zcncore.ConvertToToken(statusBar.balance), nil
7170
}
7271

73-
func GetBlobbers() ([]*zcncore.Blobber, error) {
74-
var info struct {
75-
Nodes []*zcncore.Blobber
76-
}
77-
78-
wg := &sync.WaitGroup{}
79-
statusBar := &ZCNStatus{wg: wg}
80-
wg.Add(1)
81-
82-
err := zcncore.GetBlobbers(statusBar)
83-
if err != nil {
84-
return info.Nodes, common.NewError("get_blobbers_failed", "Call to GetBlobbers failed with err: "+err.Error())
85-
}
86-
wg.Wait()
87-
88-
if !statusBar.success {
89-
return info.Nodes, nil
90-
}
91-
92-
if err = json.Unmarshal([]byte(statusBar.info), &info); err != nil {
93-
return info.Nodes, common.NewError("get_blobbers_failed", "Decoding response to GetBlobbers failed with err: "+err.Error())
94-
}
95-
96-
return info.Nodes, nil
97-
}
98-
9972
func CallFaucet() error {
10073
wg := &sync.WaitGroup{}
10174
statusBar := &ZCNStatus{wg: wg}

go.mod

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ go 1.18
44

55
require (
66
github.com/0chain/errors v1.0.3
7-
github.com/0chain/gosdk v1.8.10
7+
github.com/0chain/gosdk v1.8.11
88
github.com/DATA-DOG/go-sqlmock v1.5.0
99
github.com/didip/tollbooth/v6 v6.1.2
1010
github.com/gorilla/handlers v1.5.1
1111
github.com/gorilla/mux v1.8.0
1212
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
13-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0
13+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0
1414
github.com/herumi/bls-go-binary v1.28.2
1515
github.com/improbable-eng/grpc-web v0.15.0
1616
github.com/koding/cache v0.0.0-20161222233015-e8a81b0b3f20
@@ -20,11 +20,11 @@ require (
2020
github.com/spf13/viper v1.14.0
2121
github.com/stretchr/testify v1.8.1
2222
go.uber.org/zap v1.24.0
23-
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a
24-
golang.org/x/net v0.1.0 // indirect
25-
golang.org/x/time v0.1.0 // indirect
26-
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c
27-
google.golang.org/grpc v1.50.1
23+
golang.org/x/crypto v0.4.0
24+
golang.org/x/net v0.4.0 // indirect
25+
golang.org/x/time v0.3.0 // indirect
26+
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
27+
google.golang.org/grpc v1.51.0
2828
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
2929
google.golang.org/protobuf v1.28.1
3030
gopkg.in/natefinch/lumberjack.v2 v2.0.0
@@ -39,16 +39,17 @@ require (
3939
)
4040

4141
require (
42-
github.com/btcsuite/btcd v0.23.2 // indirect
43-
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect
44-
github.com/btcsuite/btcd/btcutil v1.1.2 // indirect
45-
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
46-
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
42+
github.com/Luzifer/go-openssl/v4 v4.1.0 // indirect
43+
github.com/btcsuite/btcd v0.23.4 // indirect
44+
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
45+
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
46+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect
47+
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
4748
github.com/davecgh/go-spew v1.1.1 // indirect
4849
github.com/deckarep/golang-set v1.8.0 // indirect
4950
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
5051
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
51-
github.com/ethereum/go-ethereum v1.10.25 // indirect
52+
github.com/ethereum/go-ethereum v1.10.26 // indirect
5253
github.com/felixge/httpsnoop v1.0.3 // indirect
5354
github.com/fsnotify/fsnotify v1.6.0 // indirect
5455
github.com/go-ole/go-ole v1.2.6 // indirect
@@ -66,37 +67,37 @@ require (
6667
github.com/jackc/pgio v1.0.0 // indirect
6768
github.com/jackc/pgpassfile v1.0.0 // indirect
6869
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
69-
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
70-
github.com/jackc/pgtype v1.12.0 // indirect
70+
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
71+
github.com/jackc/pgtype v1.13.0 // indirect
7172
github.com/jackc/pgx/v4 v4.17.2 // indirect
7273
github.com/jinzhu/inflection v1.0.0 // indirect
7374
github.com/jinzhu/now v1.1.5 // indirect
74-
github.com/klauspost/compress v1.15.11 // indirect
75-
github.com/klauspost/cpuid/v2 v2.1.2 // indirect
76-
github.com/klauspost/reedsolomon v1.11.1 // indirect
75+
github.com/klauspost/compress v1.15.13 // indirect
76+
github.com/klauspost/cpuid/v2 v2.2.2 // indirect
77+
github.com/klauspost/reedsolomon v1.11.3 // indirect
7778
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
78-
github.com/magiconair/properties v1.8.6 // indirect
79-
github.com/mattn/go-sqlite3 v1.14.15 // indirect
79+
github.com/magiconair/properties v1.8.7 // indirect
80+
github.com/mattn/go-sqlite3 v1.14.16 // indirect
8081
github.com/mitchellh/go-homedir v1.1.0 // indirect
8182
github.com/pelletier/go-toml v1.9.5 // indirect
82-
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
83+
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
8384
github.com/pmezard/go-difflib v1.0.0 // indirect
84-
github.com/rs/cors v1.8.2 // indirect
85+
github.com/rs/cors v1.8.3 // indirect
8586
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
86-
github.com/spf13/afero v1.9.2 // indirect
87+
github.com/spf13/afero v1.9.3 // indirect
8788
github.com/spf13/cast v1.5.0 // indirect
8889
github.com/spf13/jwalterweatherman v1.1.0 // indirect
8990
github.com/spf13/pflag v1.0.5 // indirect
9091
github.com/subosito/gotenv v1.4.1 // indirect
91-
github.com/tklauser/go-sysconf v0.3.10 // indirect
92-
github.com/tklauser/numcpus v0.5.0 // indirect
92+
github.com/tklauser/go-sysconf v0.3.11 // indirect
93+
github.com/tklauser/numcpus v0.6.0 // indirect
9394
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
9495
github.com/yusufpapurcu/wmi v1.2.2 // indirect
9596
go.dedis.ch/fixbuf v1.0.3 // indirect
96-
go.dedis.ch/kyber/v3 v3.0.14 // indirect
97+
go.dedis.ch/kyber/v3 v3.1.0 // indirect
9798
go.uber.org/atomic v1.10.0 // indirect
98-
go.uber.org/multierr v1.8.0 // indirect
99-
golang.org/x/text v0.4.0 // indirect
99+
go.uber.org/multierr v1.9.0 // indirect
100+
golang.org/x/text v0.5.0 // indirect
100101
gopkg.in/ini.v1 v1.67.0 // indirect
101102
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
102103
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect

0 commit comments

Comments
 (0)