diff --git a/Makefile b/Makefile index 3cafad38..e11152fc 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,9 @@ test100: @for i in {1..100}; do make test; done draw_deps: - # requires brew install graphviz - go get github.com/hirokidaichi/goviz - goviz -i ./cmd/tendermint | dot -Tpng -o huge.png + # requires brew install graphviz or apt-get install graphviz + go get github.com/RobotsAndPencils/goviz + @goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png list_deps: @go list -f '{{join .Deps "\n"}}' ./... | \ diff --git a/README.md b/README.md index a1ba8fb3..3fb5d864 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/6874 )](https://godoc.org/github.com/tendermint/tendermint) [![chat](https://img.shields.io/badge/slack-join%20chat-pink.svg)](http://forum.tendermint.com:3000/) [![license](https://img.shields.io/github/license/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/blob/master/LICENSE) +[![](https://tokei.rs/b1/github/tendermint/tendermint?category=lines)](https://github.com/tendermint/tendermint) + Branch | Tests | Coverage | Report Card ----------|-------|----------|------------- diff --git a/rpc/core/net.go b/rpc/core/net.go index df491ba8..31d9c34e 100644 --- a/rpc/core/net.go +++ b/rpc/core/net.go @@ -1,6 +1,8 @@ package core import ( + "fmt" + ctypes "github.com/tendermint/tendermint/rpc/core/types" ) @@ -31,10 +33,17 @@ func NetInfo() (*ctypes.ResultNetInfo, error) { // Dial given list of seeds func UnsafeDialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error) { + + if len(seeds) == 0 { + return &ctypes.ResultDialSeeds{}, fmt.Errorf("No seeds provided") + } // starts go routines to dial each seed after random delays log.Info("DialSeeds", "addrBook", addrBook, "seeds", seeds) err := p2pSwitch.DialSeeds(addrBook, seeds) - return &ctypes.ResultDialSeeds{}, err + if err != nil { + return &ctypes.ResultDialSeeds{}, err + } + return &ctypes.ResultDialSeeds{"Dialing seeds in progress. See /net_info for details"}, nil } //----------------------------------------------------------------------------- diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index a95f259b..940aa433 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -60,6 +60,7 @@ type ResultNetInfo struct { } type ResultDialSeeds struct { + Log string `json:"log"` } type Peer struct {