From 0432ac52c027096cda7dc188ffbaa0f1cf06f0c9 Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk Date: Wed, 26 Jun 2019 17:36:33 -0400 Subject: [PATCH] Merge PR #53: Update latest SDK version: Events Refactor --- .circleci/config.yml | 44 ++++++++++++++++++++------------------- app/app.go | 2 +- app/export.go | 2 +- cli_test/cli_test.go | 26 +++++++++++------------ cmd/gaiad/replay.go | 3 +-- cmd/gaiad/testnet.go | 1 + contrib/devtools/Makefile | 2 +- go.mod | 5 ++--- go.sum | 26 ++++++++++++++++++----- lcd_test/lcd_test.go | 28 ++++++++++++------------- 10 files changed, 78 insertions(+), 61 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a5668784c..8fd487d0e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -391,23 +391,26 @@ jobs: - store_artifacts: path: /go/src/github.com/cosmos/gaia/gaia-windows-res.yml - contract_tests: - <<: *linux_defaults - steps: - - attach_workspace: - at: /tmp/workspace - - checkout - - setup_remote_docker: - docker_layer_caching: true - - run: - name: Get Node.js and test REST implementation against swagger documentation at https://cosmos.network/rpc/ - command: | - go get github.com/snikch/goodman/cmd/goodman - make build - make build-contract-tests-hooks - make setup-contract-tests-data - export PATH=~/.local/bin:$PATH - ./contrib/get_node.sh && make contract-tests +# FIXME: The `setup-contract-tests-data` make target is broken as it completely +# overrides the .gaiad directory. +# +# contract_tests: +# <<: *linux_defaults +# steps: +# - attach_workspace: +# at: /tmp/workspace +# - checkout +# - setup_remote_docker: +# docker_layer_caching: true +# - run: +# name: Get Node.js and test REST implementation against swagger documentation at https://cosmos.network/rpc/ +# command: | +# go get github.com/snikch/goodman/cmd/goodman +# make build +# make build-contract-tests-hooks +# make setup-contract-tests-data +# export PATH=~/.local/bin:$PATH +# ./contrib/get_node.sh && make contract-tests workflows: version: 2 @@ -487,7 +490,6 @@ workflows: - master requires: - setup_dependencies - - contract_tests: - requires: - - setup_dependencies - +# - contract_tests: +# requires: +# - setup_dependencies diff --git a/app/app.go b/app/app.go index 13b6827d0..d40b9ed9b 100644 --- a/app/app.go +++ b/app/app.go @@ -177,7 +177,7 @@ func NewGaiaApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b genutil.NewAppModule(app.accountKeeper, app.stakingKeeper, app.BaseApp.DeliverTx), auth.NewAppModule(app.accountKeeper, app.feeCollectionKeeper), bank.NewAppModule(app.bankKeeper, app.accountKeeper), - crisis.NewAppModule(app.crisisKeeper, app.Logger()), + crisis.NewAppModule(app.crisisKeeper), distr.NewAppModule(app.distrKeeper), gov.NewAppModule(app.govKeeper), mint.NewAppModule(app.mintKeeper), diff --git a/app/export.go b/app/export.go index 0d6a25bca..5b2bf4836 100644 --- a/app/export.go +++ b/app/export.go @@ -55,7 +55,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st } /* Just to be safe, assert the invariants on current state. */ - app.crisisKeeper.AssertInvariants(ctx, app.Logger()) + app.crisisKeeper.AssertInvariants(ctx) /* Handle fee distribution state. */ diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index c9fe3fafa..43a8ec5a6 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -483,7 +483,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) { tests.WaitForNextNBlocksTM(1, f.Port) // Ensure transaction tags can be queried - searchResult := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr)) + searchResult := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, searchResult.Txs, 1) // Ensure deposit was deducted @@ -527,7 +527,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) { require.Equal(t, proposalTokens.Add(depositTokens), deposit.Amount.AmountOf(denom)) // Ensure tags are set on the transaction - searchResult = f.QueryTxs(1, 50, "action:deposit", fmt.Sprintf("sender:%s", fooAddr)) + searchResult = f.QueryTxs(1, 50, "message.action:deposit", fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, searchResult.Txs, 1) // Ensure account has expected amount of funds @@ -564,7 +564,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) { require.Equal(t, gov.OptionYes, votes[0].Option) // Ensure tags are applied to voting transaction properly - searchResult = f.QueryTxs(1, 50, "action:vote", fmt.Sprintf("sender:%s", fooAddr)) + searchResult = f.QueryTxs(1, 50, "message.action:vote", fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, searchResult.Txs, 1) // Ensure no proposals in deposit period @@ -626,7 +626,7 @@ func TestGaiaCLISubmitParamChangeProposal(t *testing.T) { tests.WaitForNextNBlocksTM(1, f.Port) // ensure transaction tags can be queried - txsPage := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr)) + txsPage := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage.Txs, 1) // ensure deposit was deducted @@ -710,7 +710,7 @@ func TestGaiaCLISubmitCommunityPoolSpendProposal(t *testing.T) { tests.WaitForNextNBlocksTM(1, f.Port) // ensure transaction tags can be queried - txsPage := f.QueryTxs(1, 50, "action:submit_proposal", fmt.Sprintf("sender:%s", fooAddr)) + txsPage := f.QueryTxs(1, 50, "message.action:submit_proposal", fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage.Txs, 1) // ensure deposit was deducted @@ -755,33 +755,33 @@ func TestGaiaCLIQueryTxPagination(t *testing.T) { } // perPage = 15, 2 pages - txsPage1 := f.QueryTxs(1, 15, fmt.Sprintf("sender:%s", fooAddr)) + txsPage1 := f.QueryTxs(1, 15, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage1.Txs, 15) require.Equal(t, txsPage1.Count, 15) - txsPage2 := f.QueryTxs(2, 15, fmt.Sprintf("sender:%s", fooAddr)) + txsPage2 := f.QueryTxs(2, 15, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage2.Txs, 15) require.NotEqual(t, txsPage1.Txs, txsPage2.Txs) - txsPage3 := f.QueryTxs(3, 15, fmt.Sprintf("sender:%s", fooAddr)) + txsPage3 := f.QueryTxs(3, 15, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage3.Txs, 15) require.Equal(t, txsPage2.Txs, txsPage3.Txs) // perPage = 16, 2 pages - txsPage1 = f.QueryTxs(1, 16, fmt.Sprintf("sender:%s", fooAddr)) + txsPage1 = f.QueryTxs(1, 16, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage1.Txs, 16) - txsPage2 = f.QueryTxs(2, 16, fmt.Sprintf("sender:%s", fooAddr)) + txsPage2 = f.QueryTxs(2, 16, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPage2.Txs, 14) require.NotEqual(t, txsPage1.Txs, txsPage2.Txs) // perPage = 50 - txsPageFull := f.QueryTxs(1, 50, fmt.Sprintf("sender:%s", fooAddr)) + txsPageFull := f.QueryTxs(1, 50, fmt.Sprintf("message.sender:%s", fooAddr)) require.Len(t, txsPageFull.Txs, 30) require.Equal(t, txsPageFull.Txs, append(txsPage1.Txs, txsPage2.Txs...)) // perPage = 0 - f.QueryTxsInvalid(errors.New("ERROR: page must greater than 0"), 0, 50, fmt.Sprintf("sender:%s", fooAddr)) + f.QueryTxsInvalid(errors.New("ERROR: page must greater than 0"), 0, 50, fmt.Sprintf("message.sender:%s", fooAddr)) // limit = 0 - f.QueryTxsInvalid(errors.New("ERROR: limit must greater than 0"), 1, 0, fmt.Sprintf("sender:%s", fooAddr)) + f.QueryTxsInvalid(errors.New("ERROR: limit must greater than 0"), 1, 0, fmt.Sprintf("message.sender:%s", fooAddr)) // Cleanup testing directories f.Cleanup() diff --git a/cmd/gaiad/replay.go b/cmd/gaiad/replay.go index 209ec29c1..3e0153291 100644 --- a/cmd/gaiad/replay.go +++ b/cmd/gaiad/replay.go @@ -150,8 +150,7 @@ func replayTxs(rootDir string) error { // Create executor fmt.Fprintln(os.Stderr, "Creating block executor") - blockExec := tmsm.NewBlockExecutor(tmDB, ctx.Logger, proxyApp.Consensus(), - tmsm.MockMempool{}, tmsm.MockEvidencePool{}) + blockExec := tmsm.NewBlockExecutor(tmDB, ctx.Logger, proxyApp.Consensus(), nil, tmsm.MockEvidencePool{}) // Create block store fmt.Fprintln(os.Stderr, "Creating block store") diff --git a/cmd/gaiad/testnet.go b/cmd/gaiad/testnet.go index 5a287d451..fcf8433fc 100644 --- a/cmd/gaiad/testnet.go +++ b/cmd/gaiad/testnet.go @@ -124,6 +124,7 @@ func InitTestnet(cmd *cobra.Command, config *tmconfig.Config, cdc *codec.Codec, gentxsDir := filepath.Join(outputDir, "gentxs") config.SetRoot(nodeDir) + config.RPC.ListenAddress = "tcp://0.0.0.0:26657" if err := os.MkdirAll(filepath.Join(nodeDir, "config"), nodeDirPerm); err != nil { _ = os.RemoveAll(outputDir) diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index c6a4d6c2b..3eb9cfd72 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -69,7 +69,7 @@ $(CLOG): $(call go_install,alessio,clog,1) $(RUNSIM): - go get github.com/cosmos/cosmos-sdk/contrib/runsim@v0.28.2-0.20190622092459-7b5e6cee0787 + go get github.com/cosmos/cosmos-sdk/contrib/runsim@v0.28.2-0.20190626164114-c898dac6a9fc go install -mod=readonly github.com/cosmos/cosmos-sdk/contrib/runsim tools-clean: diff --git a/go.mod b/go.mod index 6002f3abd..190d8d9f6 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,8 @@ go 1.12 require ( github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c // indirect - github.com/cosmos/cosmos-sdk v0.28.2-0.20190622092459-7b5e6cee0787 + github.com/cosmos/cosmos-sdk v0.28.2-0.20190626164114-c898dac6a9fc github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect - github.com/google/gofuzz v1.0.0 // indirect github.com/gorilla/mux v1.7.2 // indirect github.com/magiconair/properties v1.8.1 // indirect github.com/mattn/go-isatty v0.0.8 // indirect @@ -27,7 +26,7 @@ require ( github.com/stretchr/testify v1.3.0 github.com/syndtr/goleveldb v1.0.0 // indirect github.com/tendermint/go-amino v0.15.0 - github.com/tendermint/tendermint v0.31.5 + github.com/tendermint/tendermint v0.32.0 golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f // indirect golang.org/x/sys v0.0.0-20190527104216-9cd6430ef91e // indirect golang.org/x/text v0.3.2 // indirect diff --git a/go.sum b/go.sum index bd3915a75..d29a20a7f 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.28.2-0.20190622092459-7b5e6cee0787 h1:XGquCRUoKKg1g0Brutz2rMQsXRhtZ0h48acUpf4Uwo0= -github.com/cosmos/cosmos-sdk v0.28.2-0.20190622092459-7b5e6cee0787/go.mod h1:qmAeSBtA2C1zBXJ7jqzpQV4AP9WbdZdk4uwIkjyn2Jw= +github.com/cosmos/cosmos-sdk v0.28.2-0.20190626164114-c898dac6a9fc h1:7xWMlVQdgCd/zLYLDKPFKWFu+AsCTyfvoL6gXNjdi8M= +github.com/cosmos/cosmos-sdk v0.28.2-0.20190626164114-c898dac6a9fc/go.mod h1:60lRWFK7DUes/k5FIyDeE+3rS2Q0/wHek/ep6SLUUow= github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -53,11 +53,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/etcd-io/bbolt v1.3.2 h1:RLRQ0TKLX7DlBRXAJHvbmXL17Q3KNnTBtZ9B6Qo+/Y0= +github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= 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= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -89,6 +93,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -117,6 +122,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5/go.mod h1:c2mYKRyMb1BPkO5St0c/ps62L4S0W2NAkaTXj9qEI+0= +github.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018/go.mod h1:sFlOUpQL1YcjhFVXhg1CG8ZASEs/Mf1oVb6H75JL/zg= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -129,6 +136,7 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -160,6 +168,7 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -194,6 +203,7 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -201,6 +211,7 @@ github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmq github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= @@ -209,19 +220,20 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/syndtr/goleveldb v0.0.0-20181012014443-6b91fda63f2e/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5 h1:u8i49c+BxloX3XQ55cvzFNXplizZP/q00i+IlttUjAU= github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/go-amino v0.15.0 h1:TC4e66P59W7ML9+bxio17CPKnxW3nKIRAYskntMAoRk= github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/iavl v0.12.2 h1:Ls5p5VINCM1HRT9g5Vvs2zmDOCU/CCIvIHzd/pZ8P0E= github.com/tendermint/iavl v0.12.2/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= -github.com/tendermint/tendermint v0.31.5 h1:vTet8tCq3B9/J9Yo11dNZ8pOB7NtSy++bVSfkP4KzR4= -github.com/tendermint/tendermint v0.31.5/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= +github.com/tendermint/tendermint v0.32.0 h1:9MAnZpWjuA3DnAXWqjYxrBXOYC0Xk8zZJgV6IO3LdBw= +github.com/tendermint/tendermint v0.32.0/go.mod h1:/5wKhXBcO1eS9qfBs2X4OcNys07c7ls+O11iODzCRhE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -230,6 +242,8 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -277,8 +291,10 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69 h1:4rNOqY4ULrKzS6twXa619uQgI7h9PaVd4ZhjFQ7C5zs= google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/lcd_test/lcd_test.go b/lcd_test/lcd_test.go index 2937d6917..73d355127 100644 --- a/lcd_test/lcd_test.go +++ b/lcd_test/lcd_test.go @@ -341,14 +341,14 @@ func TestTxs(t *testing.T) { require.Equal(t, emptyTxs, txResult.Txs) // query empty - txResult = getTransactions(t, port, fmt.Sprintf("sender=%s", addr.String())) + txResult = getTransactions(t, port, fmt.Sprintf("message.sender=%s", addr.String())) require.Equal(t, emptyTxs, txResult.Txs) // also tests url decoding - txResult = getTransactions(t, port, fmt.Sprintf("sender=%s", addr.String())) + txResult = getTransactions(t, port, fmt.Sprintf("message.sender=%s", addr.String())) require.Equal(t, emptyTxs, txResult.Txs) - txResult = getTransactions(t, port, fmt.Sprintf("action=submit%%20proposal&sender=%s", addr.String())) + txResult = getTransactions(t, port, fmt.Sprintf("message.action=submit_proposal&message.sender=%s", addr.String())) require.Equal(t, emptyTxs, txResult.Txs) // create tx @@ -360,12 +360,12 @@ func TestTxs(t *testing.T) { require.Equal(t, resultTx.TxHash, tx.TxHash) // query sender - txResult = getTransactions(t, port, fmt.Sprintf("sender=%s", addr.String())) + txResult = getTransactions(t, port, fmt.Sprintf("message.sender=%s", addr.String())) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) // query recipient - txResult = getTransactions(t, port, fmt.Sprintf("recipient=%s", receiveAddr.String())) + txResult = getTransactions(t, port, fmt.Sprintf("transfer.recipient=%s", receiveAddr.String())) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) @@ -473,8 +473,8 @@ func TestBonding(t *testing.T) { // query tx txResult := getTransactions(t, port, - fmt.Sprintf("action=delegate&sender=%s", addr), - fmt.Sprintf("destination-validator=%s", operAddrs[0]), + fmt.Sprintf("message.action=delegate&message.sender=%s", addr), + fmt.Sprintf("delegate.validator=%s", operAddrs[0]), ) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) @@ -526,8 +526,8 @@ func TestBonding(t *testing.T) { // query tx txResult = getTransactions(t, port, - fmt.Sprintf("action=begin_unbonding&sender=%s", addr), - fmt.Sprintf("source-validator=%s", operAddrs[0]), + fmt.Sprintf("message.action=begin_unbonding&message.sender=%s", addr), + fmt.Sprintf("unbond.validator=%s", operAddrs[0]), ) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) @@ -563,9 +563,9 @@ func TestBonding(t *testing.T) { // query tx txResult = getTransactions(t, port, - fmt.Sprintf("action=begin_redelegate&sender=%s", addr), - fmt.Sprintf("source-validator=%s", operAddrs[0]), - fmt.Sprintf("destination-validator=%s", operAddrs[1]), + fmt.Sprintf("message.action=begin_redelegate&message.sender=%s", addr), + fmt.Sprintf("redelegate.source_validator=%s", operAddrs[0]), + fmt.Sprintf("redelegate.destination_validator=%s", operAddrs[1]), ) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) @@ -773,7 +773,7 @@ func TestDeposit(t *testing.T) { require.Equal(t, expectedBalance.Amount.Sub(depositTokens), acc.GetCoins().AmountOf(sdk.DefaultBondDenom)) // query tx - txResult := getTransactions(t, port, fmt.Sprintf("action=deposit&sender=%s", addr)) + txResult := getTransactions(t, port, fmt.Sprintf("message.action=deposit&message.sender=%s", addr)) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height) @@ -836,7 +836,7 @@ func TestVote(t *testing.T) { expectedBalance = coins[0] // query tx - txResult := getTransactions(t, port, fmt.Sprintf("action=vote&sender=%s", addr)) + txResult := getTransactions(t, port, fmt.Sprintf("message.action=vote&message.sender=%s", addr)) require.Len(t, txResult.Txs, 1) require.Equal(t, resultTx.Height, txResult.Txs[0].Height)