diff --git a/Makefile b/Makefile index 71d72928..065a8d1e 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ cosmos_dir=$(swagger_dir)/cosmos-sdk dnode = ./cmd/dnode dncli =./cmd/dncli -cosmos_version = dfinance/launchpad +cosmos_version = $(shell awk '/replace github.com\/cosmos\/cosmos-sdk => github.com\/dfinance\/cosmos-sdk/ {print $$NF}' < go.mod) all: install install: go.sum install-dnode install-dncli @@ -51,17 +51,17 @@ go.sum: go.mod GO111MODULE=on go mod verify swagger-ui-deps: - @echo "--> Preparing deps fro building Swagger API specificaion" + @echo "--> Preparing deps for building Swagger API specificaion" @echo "-> Make tmp build folder" rm -rf $(swagger_dir) mkdir -p $(cosmos_dir) @echo "-> Cosmos-SDK $(cosmos_version) checkout" - git -C $(swagger_dir) clone --branch $(cosmos_version) https://github.com/dfinance/cosmos-sdk.git + git -C $(swagger_dir) clone --depth 1 --branch $(cosmos_version) https://github.com/dfinance/cosmos-sdk.git @echo "-> Fetching Golang libraries: swag, statik" - go get -u github.com/swaggo/swag/cmd/swag + go get -u github.com/swaggo/swag/cmd/swag@v1.6.7 go get github.com/g3co/go-swagger-merger swagger-ui-build: diff --git a/cmd/dncli/docs/swagger.go b/cmd/dncli/docs/swagger.go index 05ae8112..ca5c16b1 100644 --- a/cmd/dncli/docs/swagger.go +++ b/cmd/dncli/docs/swagger.go @@ -771,8 +771,8 @@ definitions: $ref: '#/definitions/types.Currencies' ccstorage.Currency: $ref: '#/definitions/types.Currency' - crypto.PubKey: - type: object + crypto.Address: + $ref: '#/definitions/bytes.HexBytes' markets.MarketExtended: $ref: '#/definitions/types.MarketExtended' msmodule.MsMsg: @@ -1152,21 +1152,20 @@ definitions: format: number type: string type: object - rest.QueryDelegationDelegatorRewardsResp: + rest.QueryDelegationResp: properties: height: type: integer result: - items: - $ref: '#/definitions/types.DelegationDelegatorReward' - type: array + $ref: '#/definitions/types.Delegation' + type: object type: object - rest.QueryDelegationResp: + rest.QueryDelegationRewardsResp: properties: height: type: integer result: - $ref: '#/definitions/types.Delegation' + $ref: '#/definitions/types.QueryDelegationRewardsResponse' type: object type: object rest.QueryDelegationsResp: @@ -1178,6 +1177,14 @@ definitions: $ref: '#/definitions/types.DelegationResponse' type: array type: object + rest.QueryDelegatorRewardsResp: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.QueryDelegatorTotalRewardsResponse' + type: object + type: object rest.QueryExtendedValidatorResp: properties: height: @@ -1577,7 +1584,7 @@ definitions: type: integer type: array types.Address: - type: object + $ref: '#/definitions/crypto.Address' types.Asset: properties: active: @@ -2159,8 +2166,9 @@ definitions: types.PartSetHeader: properties: hash: - $ref: '#/definitions/bytes.HexBytes' - type: object + items: + type: integer + type: array total: type: integer type: object @@ -2206,6 +2214,31 @@ definitions: format: RFC 3339 type: string type: object + types.QueryDelegationRewardsResponse: + properties: + rewards: + $ref: '#/definitions/types.DelegationDelegatorReward' + description: Current rewards for a specific validator + type: object + total: + $ref: '#/definitions/types.DecCoins' + description: |- + All validators rewards accumulated on delegation modification events (shares change, undelegation, redelegation) + This truncated Int value would be transferred to the delegator account on withdraw_delegator_reward Tx + type: object + type: object + types.QueryDelegatorTotalRewardsResponse: + properties: + rewards: + description: Current rewards for all delegated validators + items: + $ref: '#/definitions/types.DelegationDelegatorReward' + type: array + total: + $ref: '#/definitions/types.DecCoins' + description: All validators rewards accumulated on delegations modification events (shares change, undelegation, redelegation) + type: object + type: object types.RedelegationEntry: properties: completion_time: @@ -3080,7 +3113,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/rest.QueryDelegationDelegatorRewardsResp' + $ref: '#/definitions/rest.QueryDelegatorRewardsResp' "400": description: Returned if the request doesn't have valid query params schema: @@ -3152,7 +3185,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/rest.QueryDecCoinsResp' + $ref: '#/definitions/rest.QueryDelegationRewardsResp' "400": description: Returned if the request doesn't have valid query params schema: diff --git a/go.mod b/go.mod index 8e6c6d11..e37305a6 100644 --- a/go.mod +++ b/go.mod @@ -2,12 +2,16 @@ module github.com/dfinance/dnode go 1.14 -replace github.com/cosmos/cosmos-sdk => github.com/dfinance/cosmos-sdk v0.38.4-0.20201013133805-612a04d62955 +replace github.com/cosmos/cosmos-sdk => github.com/dfinance/cosmos-sdk v0.39.1-0.1 // Local development option //replace github.com/cosmos/cosmos-sdk => /Users/boris/go/src/github.com/dfinance/cosmos-sdk //replace github.com/cosmos/cosmos-sdk => /Users/tiky/Go_Projects/src/github.com/dfinance/cosmos-sdk +// Fix of OS X hostmachine test runs +// Source: https://github.com/ory/dockertest/issues/208 +replace golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 + require ( github.com/99designs/keyring v1.1.3 github.com/OneOfOne/xxhash v1.2.7 @@ -18,14 +22,18 @@ require ( github.com/dfinance/glav v0.0.0-20200814081332-c4701f6c12a6 github.com/dfinance/lcs v0.1.7-big github.com/fsouza/go-dockerclient v1.6.6-0.20200910033347-214a51d9a1e5 + github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09 // indirect github.com/getsentry/sentry-go v0.5.1 github.com/ghodss/yaml v1.0.0 - github.com/go-openapi/spec v0.19.9 // indirect - github.com/go-openapi/swag v0.19.9 // indirect + github.com/gin-gonic/gin v1.6.3 // indirect + github.com/go-openapi/spec v0.19.10 // indirect + github.com/go-openapi/swag v0.19.10 // indirect + github.com/gofrs/uuid v3.3.0+incompatible // indirect github.com/gogo/protobuf v1.3.1 github.com/gorilla/handlers v1.4.2 github.com/gorilla/mux v1.8.0 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/kr/pty v1.1.5 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/olekukonko/tablewriter v0.0.4 @@ -33,6 +41,7 @@ require ( github.com/pelletier/go-toml v1.6.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 // indirect + github.com/satori/go.uuid v1.2.0 // indirect github.com/shopspring/decimal v1.2.0 github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cobra v1.0.0 @@ -45,8 +54,6 @@ require ( github.com/tendermint/go-amino v0.15.1 github.com/tendermint/tendermint v0.33.7 github.com/tendermint/tm-db v0.5.1 - golang.org/x/net v0.0.0-20201010224723-4f7140c49acb // indirect - golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 // indirect google.golang.org/grpc v1.30.0 google.golang.org/protobuf v1.24.0 // indirect k8s.io/apimachinery v0.18.6 // indirect diff --git a/go.sum b/go.sum index 8831dcf7..e7864fef 100644 --- a/go.sum +++ b/go.sum @@ -156,6 +156,10 @@ 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/dfinance/cosmos-sdk v0.38.4-0.20201013133805-612a04d62955 h1:v4W3rEu73BWKh3h72B0LcuW1UXgcIgtCB5IXDz5aeIc= github.com/dfinance/cosmos-sdk v0.38.4-0.20201013133805-612a04d62955/go.mod h1:6A7WcR5vEsVN5MSi5gkMJmJIMulHZftD7q63tBdt2r0= +github.com/dfinance/cosmos-sdk v0.38.4-0.20201019153456-9e38e629315d h1:71tcFFWzHASNk35Bew1YfawToDJYFCQam7FKOUE17XQ= +github.com/dfinance/cosmos-sdk v0.38.4-0.20201019153456-9e38e629315d/go.mod h1:6A7WcR5vEsVN5MSi5gkMJmJIMulHZftD7q63tBdt2r0= +github.com/dfinance/cosmos-sdk v0.39.1-0.1 h1:j74lAmeScm0z6Q7+oN50E86yMkFGmgt7X4x8uZC3bPI= +github.com/dfinance/cosmos-sdk v0.39.1-0.1/go.mod h1:2sfZJgnTxx4j5VycscAUaaI3P7ay5v0AfaO/UZXTFr0= github.com/dfinance/dvm-proto/go v0.0.0-20200819065410-6b70956c85de h1:PZfrjeOs9epAU0n+FpX/JAr/e+5m5/GdfUsgtO8gCOY= github.com/dfinance/dvm-proto/go v0.0.0-20200819065410-6b70956c85de/go.mod h1:Vt1T0G56AYXbsduNKzSkq1RDTNa8PFraSqB9DaTCV0U= github.com/dfinance/glav v0.0.0-20200814081332-c4701f6c12a6 h1:fZIYncA5BRad0+YnP88cfBfo0ZPgxPSVeuh/jvoGrLc= @@ -216,6 +220,8 @@ github.com/fsouza/go-dockerclient v1.6.3 h1:VS/I3mxieZVIeaWXd57JKvSjheELafUJYtbl github.com/fsouza/go-dockerclient v1.6.3/go.mod h1:OiSy/IhZIF+zheikZkXK7LVpGzxWchJPJKGWhBqOK4M= github.com/fsouza/go-dockerclient v1.6.6-0.20200910033347-214a51d9a1e5 h1:povIUEJkhqfRW9IFv1kilK2EOwhLy3Vf9iUJ2cPI508= github.com/fsouza/go-dockerclient v1.6.6-0.20200910033347-214a51d9a1e5/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk= +github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09 h1:hivvvYOTeYy+Dm9nLesXatmELP5Q/4v8vyPrkZfjQs8= +github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09/go.mod h1:jvC3b+YoOx9/SJYqqo1pN1vJ31StlOCugGCyO3EW9XA= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/getsentry/sentry-go v0.4.0/go.mod h1:xkGcb82SipKQloDNa5b7hTV4VdEyc2bhwd1/UczP52k= @@ -230,6 +236,7 @@ github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NB github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -269,6 +276,8 @@ github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsd github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.9 h1:9z9cbFuZJ7AcvOHKIY+f6Aevb4vObNDkTEyoMfO7rAc= github.com/go-openapi/spec v0.19.9/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= +github.com/go-openapi/spec v0.19.10 h1:pcNevfYytLaOQuTju0wm6OqcqU/E/pRwuSGigrLTI28= +github.com/go-openapi/spec v0.19.10/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -276,6 +285,12 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.10 h1:A1SWXruroGP15P1sOiegIPbaKio+G9N5TwWTFaVPmAU= +github.com/go-openapi/swag v0.19.10/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -285,6 +300,7 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -462,6 +478,7 @@ 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/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -738,6 +755,8 @@ github.com/swaggo/swag v1.6.3 h1:N+uVPGP4H2hXoss2pt5dctoSUPKKRInr6qcTMOm0usI= github.com/swaggo/swag v1.6.3/go.mod h1:wcc83tB4Mb2aNiL/HP4MFeQdpHUrca+Rp/DRNgWAUio= github.com/swaggo/swag v1.6.7 h1:e8GC2xDllJZr3omJkm9YfmK0Y56+rMO3cg0JBKNz09s= github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/swaggo/swag v1.6.8 h1:z3ZNcpJs/NLMpZcKqXUsBELmmY2Ocy09JXKx5gu3L4M= +github.com/swaggo/swag v1.6.8/go.mod h1:a0IpNeMfGidNOcm2TsqODUh9JHdHu3kxDA0UlGbBKjI= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= @@ -773,6 +792,8 @@ github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -790,6 +811,7 @@ github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmv github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -868,9 +890,14 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0 h1:5kGOVHlq0euqwzgTC9Vu15p6fV1Wi0ArVi8da2urnVg= +golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201020065357-d65d470038a5 h1:KrxvpY64uUzANd9wKWr6ZAsufiii93XnvXaeikyCJ2g= +golang.org/x/net v0.0.0-20201020065357-d65d470038a5/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -917,6 +944,8 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 h1:DvY3Zkh7KabQE/kfzMvYvKirSiguP9Q/veMtkYyf0o8= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -954,8 +983,14 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114 h1:DnSr2mCsxyCE6ZgIkmcWUQY2R5cH/6wL7eIxEmQOMSE= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 h1:kLBxO4OPBgPwjg8Vvu+/0DCHIfDwYIGNFcD66NU9kpo= golang.org/x/tools v0.0.0-20201013053347-2db1cd791039/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201019155933-b2746f1d7ac6 h1:/NAv0hEgtqJ/Gxo/L1c7JcDgiCYT+qhX8KJW55lyc2k= +golang.org/x/tools v0.0.0-20201019155933-b2746f1d7ac6/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201019160706-0a3dcccdcf7a/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201019175715-b894a3290fff h1:HiwHyqQ9ttqCHuTa++R4wNxOg6MY1hduSDT8j2aXoMM= +golang.org/x/tools v0.0.0-20201019175715-b894a3290fff/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= diff --git a/helpers/tests/simulator/sim_ops_rewards_delegator.go b/helpers/tests/simulator/sim_ops_rewards_delegator.go index d61b3b88..91df5302 100644 --- a/helpers/tests/simulator/sim_ops_rewards_delegator.go +++ b/helpers/tests/simulator/sim_ops_rewards_delegator.go @@ -45,7 +45,7 @@ func getDelegatorRewardOpFindTarget(s *Simulator) (targets []delegatorRewardOpTa // estimate reward coins curRewardCoins := sdk.NewCoins() - for _, decCoin := range s.QueryDistDelReward(acc.Address, delegation.ValidatorAddress) { + for _, decCoin := range s.QueryDistDelReward(acc.Address, delegation.ValidatorAddress).Total { coin, _ := decCoin.TruncateDecimal() curRewardCoins = curRewardCoins.Add(coin) } diff --git a/helpers/tests/simulator/sim_queries.go b/helpers/tests/simulator/sim_queries.go index 2a8840ef..610a794f 100644 --- a/helpers/tests/simulator/sim_queries.go +++ b/helpers/tests/simulator/sim_queries.go @@ -233,7 +233,7 @@ func (s *Simulator) QueryDistPool(poolName distribution.RewardPoolName) (res sdk } // QueryDistDelReward queries current delegator rewards for specified validator. -func (s *Simulator) QueryDistDelReward(accAddr sdk.AccAddress, valAddr sdk.ValAddress) (res sdk.DecCoins) { +func (s *Simulator) QueryDistDelReward(accAddr sdk.AccAddress, valAddr sdk.ValAddress) (res distribution.QueryDelegationRewardsResponse) { resp := s.RunQuery( distribution.QueryDelegationRewardsParams{ DelegatorAddress: accAddr,