mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 04:01:40 +00:00
move DialSeeds to go-p2p and add to rpc
This commit is contained in:
@ -12,6 +12,7 @@ var Routes = map[string]*rpc.RPCFunc{
|
||||
"unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"),
|
||||
"status": rpc.NewRPCFunc(StatusResult, ""),
|
||||
"net_info": rpc.NewRPCFunc(NetInfoResult, ""),
|
||||
"dial_seeds": rpc.NewRPCFunc(DialSeedsResult, "seeds"),
|
||||
"blockchain": rpc.NewRPCFunc(BlockchainInfoResult, "minHeight,maxHeight"),
|
||||
"genesis": rpc.NewRPCFunc(GenesisResult, ""),
|
||||
"get_block": rpc.NewRPCFunc(GetBlockResult, "height"),
|
||||
@ -54,6 +55,14 @@ func NetInfoResult() (ctypes.TMResult, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func DialSeedsResult(seeds []string) (ctypes.TMResult, error) {
|
||||
if r, err := DialSeeds(seeds); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return r, nil
|
||||
}
|
||||
}
|
||||
|
||||
func BlockchainInfoResult(min, max int) (ctypes.TMResult, error) {
|
||||
if r, err := BlockchainInfo(min, max); err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user