Skip to content

Commit

Permalink
Merge pull request #818 from HaoyangLiu/develop
Browse files Browse the repository at this point in the history
R4R: Move client/lcd to lite
  • Loading branch information
wukongcheng authored Dec 13, 2018
2 parents 5b23e1d + b4805a5 commit c58e900
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 32 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ docs/.vuepress/dist/
node_modules/
package.json
yarn.lock
client/lcd/statik/statik.go
lite/statik/statik.go
dependency-graph.png
tools/protobuf/*.a
tools/protobuf/*.o
tools/protobuf/*.so

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ draw_deps:
########################################
### Generate swagger docs for irislcd
update_irislcd_swagger_docs:
@statik -src=client/lcd/swaggerui -dest=client/lcd -f
@statik -src=lite/swagger-ui -dest=lite -f

########################################
### Compile and Install
Expand Down
6 changes: 3 additions & 3 deletions cmd/irislcd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"github.com/irisnet/irishub/app"
"github.com/irisnet/irishub/client/lcd"
_ "github.com/irisnet/irishub/client/lcd/statik"
"github.com/irisnet/irishub/lite"
_ "github.com/irisnet/irishub/lite/statik"
irisInit "github.com/irisnet/irishub/server/init"
"github.com/irisnet/irishub/version"
"github.com/spf13/cobra"
Expand All @@ -26,7 +26,7 @@ func main() {
cdc := app.MakeCodec()

rootCmd.AddCommand(
lcd.ServeLCDStartCommand(cdc),
lite.ServeLCDStartCommand(cdc),
version.ServeVersionCommand(cdc),
)

Expand Down
11 changes: 5 additions & 6 deletions client/lcd/lcd.go → lite/lcd.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package lcd
package lite

import (
"os"

"net/http"
"os"

"github.com/irisnet/irishub/codec"
"github.com/gorilla/mux"
"github.com/irisnet/irishub/client"
bankhandler "github.com/irisnet/irishub/client/bank/lcd"
Expand All @@ -15,10 +13,11 @@ import (
keyshandler "github.com/irisnet/irishub/client/keys/lcd"
recordhandle "github.com/irisnet/irishub/client/record/lcd"
servicehandle "github.com/irisnet/irishub/client/service/lcd"
rpchandler "github.com/irisnet/irishub/client/tendermint/rpc"
slashinghandler "github.com/irisnet/irishub/client/slashing/lcd"
txhandler "github.com/irisnet/irishub/client/tendermint/tx"
stakehandler "github.com/irisnet/irishub/client/stake/lcd"
rpchandler "github.com/irisnet/irishub/client/tendermint/rpc"
txhandler "github.com/irisnet/irishub/client/tendermint/tx"
"github.com/irisnet/irishub/codec"
"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion client/lcd/lcd_test.go → lite/lcd_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package lcd
package lite

import (
"encoding/hex"
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
swagger: '2.0'
info:
description: A REST interface for state queries, transaction generation, signing, and broadcast.
version: "0.8.0"
version: "0.9.0"
title: IRISLCD Swagger-UI
termsOfService: https://www.irisnet.org
contact:
Expand Down
20 changes: 9 additions & 11 deletions client/lcd/test_helpers.go → lite/test_helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package lcd
package lite

import (
"bytes"
Expand All @@ -12,23 +12,21 @@ import (
"strings"
"testing"

irisapp "github.com/irisnet/irishub/app"
"github.com/irisnet/irishub/app/v0"
"github.com/irisnet/irishub/client"
"github.com/irisnet/irishub/client/keys"
"github.com/irisnet/irishub/codec"
crkeys "github.com/irisnet/irishub/crypto/keys"
"github.com/irisnet/irishub/modules/auth"
"github.com/irisnet/irishub/modules/gov"
"github.com/irisnet/irishub/modules/stake"
"github.com/irisnet/irishub/modules/upgrade"
"github.com/irisnet/irishub/server"
"github.com/irisnet/irishub/tests"
sdk "github.com/irisnet/irishub/types"
"github.com/irisnet/irishub/modules/auth"

"github.com/spf13/viper"
"github.com/stretchr/testify/require"

"github.com/irisnet/irishub/modules/stake"
irisapp "github.com/irisnet/irishub/app"
"github.com/irisnet/irishub/app/v0"
"github.com/irisnet/irishub/client"
"github.com/irisnet/irishub/client/keys"
"github.com/irisnet/irishub/modules/gov"
"github.com/irisnet/irishub/modules/upgrade"
abci "github.com/tendermint/tendermint/abci/types"
tmcfg "github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/crypto"
Expand Down
7 changes: 4 additions & 3 deletions client/lcd/version.go → lite/version.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package lcd
package lite

import (
"fmt"
"net/http"

"github.com/irisnet/irishub/client/context"
"github.com/irisnet/irishub/version"
)
Expand All @@ -16,7 +17,7 @@ func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request) {
// connected node version REST handler endpoint
func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
version, err := cliCtx.Query("/app/version",nil)
version, err := cliCtx.Query("/app/version", nil)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(fmt.Sprintf("Could't query version. Error: %s", err.Error())))
Expand All @@ -25,4 +26,4 @@ func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc {

w.Write(version)
}
}
}
4 changes: 2 additions & 2 deletions client/lcd/wire.go → lite/wire.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lcd
package lite

import (
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/irisnet/irishub/codec"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)

var cdc = codec.New()
Expand Down

0 comments on commit c58e900

Please sign in to comment.