Skip to content

Commit

Permalink
Merge pull request #3 from blockpane/release/1.0.3
Browse files Browse the repository at this point in the history
bump fio-go to fix nil pointer, cleanup junk in voter table from testnet
  • Loading branch information
blockpane authored Jan 8, 2021
2 parents a9d3799 + 68f98c9 commit 1ef0562
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/btcsuite/btcd v0.20.1-beta
github.com/btcsuite/btcutil v1.0.1
github.com/ethereum/go-ethereum v1.9.15
github.com/fioprotocol/fio-go v1.0.3-0.20201222151005-9e1df6dd6005
github.com/fioprotocol/fio-go v1.0.3-0.20210108173809-98ac48363ba8
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/text v0.3.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ github.com/fioprotocol/fio-go v1.0.3-0.20201220224546-01e10838c33f h1:z7USAVPeG0
github.com/fioprotocol/fio-go v1.0.3-0.20201220224546-01e10838c33f/go.mod h1:cX96BK9Y8fQPJP2GXGQvCFovHJ35lw7ICUUUAzqnH40=
github.com/fioprotocol/fio-go v1.0.3-0.20201222151005-9e1df6dd6005 h1:j65XCEjg+xFKKcsngbXRECbXN2UEZGqGrO7tq3+u0qI=
github.com/fioprotocol/fio-go v1.0.3-0.20201222151005-9e1df6dd6005/go.mod h1:cX96BK9Y8fQPJP2GXGQvCFovHJ35lw7ICUUUAzqnH40=
github.com/fioprotocol/fio-go v1.0.3-0.20210108173809-98ac48363ba8 h1:xrIGis41tO44VljhbH87aPHVIra5q/d/w5f56Ou4FW8=
github.com/fioprotocol/fio-go v1.0.3-0.20210108173809-98ac48363ba8/go.mod h1:cX96BK9Y8fQPJP2GXGQvCFovHJ35lw7ICUUUAzqnH40=
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down
14 changes: 13 additions & 1 deletion vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,22 @@ var bpInfoCache = make(map[string]*bpInfo)

func getBpInfo(actor string, api *fio.API) ([]bpInfo, error) {
bpi := make([]bpInfo, 0)
prods, err := api.GetFioProducers()
p, err := api.GetFioProducers()
if err != nil {
return bpi, err
}

prods := &fio.Producers{
Producers: make([]fio.Producer, 0),
}
// little hack for testnet to cleanup crap from various test scripts:
for i := range p.Producers {
if strings.Contains(p.Producers[i].Url, "dapix.io") {
continue
}
prods.Producers = append(prods.Producers, p.Producers[i])
}

curVotes := strings.Split(GetCurrentVotes(actor, api), ",")
for i := range curVotes {
curVotes[i] = strings.TrimSpace(curVotes[i])
Expand Down

0 comments on commit 1ef0562

Please sign in to comment.