Away from master onto v0.40.0-rc1
This commit is contained in:
@@ -442,7 +442,7 @@ func NewWasmApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b
|
||||
)
|
||||
app.mm.RegisterInvariants(&app.crisisKeeper)
|
||||
app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
|
||||
app.mm.RegisterServices(module.NewConfigurator(app.GRPCQueryRouter()))
|
||||
app.mm.RegisterServices(module.NewConfigurator(app.MsgServiceRouter(), app.GRPCQueryRouter()))
|
||||
|
||||
// add test gRPC service for testing gRPC queries in isolation
|
||||
// testdata.RegisterTestServiceServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) // TODO: this is testdata !!!!
|
||||
|
||||
@@ -97,7 +97,7 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount) *wasmd.WasmApp
|
||||
// the parameter 'expPass' against the result. A corresponding result is
|
||||
// returned.
|
||||
func SignAndDeliver(
|
||||
t *testing.T, app *wasmd.WasmApp, msgs []sdk.Msg,
|
||||
t *testing.T, txCfg client.TxConfig, app *wasmd.WasmApp, msgs []sdk.Msg,
|
||||
accNums, seq []uint64, expPass bool, priv ...crypto.PrivKey,
|
||||
) (sdk.GasInfo, *sdk.Result, error) {
|
||||
t.Helper()
|
||||
@@ -115,7 +115,7 @@ func SignAndDeliver(
|
||||
// Simulate a sending a transaction and committing a block
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmtypes.Header{Height: app.LastBlockHeight() + 1, ChainID: SimAppChainID}})
|
||||
|
||||
gasInfo, res, err := app.Deliver(tx)
|
||||
gasInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx)
|
||||
if expPass {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
|
||||
@@ -44,7 +44,8 @@ func TestSendWithApp(t *testing.T) {
|
||||
}
|
||||
|
||||
func sign(t *testing.T, wasm *app.WasmApp, msg sdk.Msg, signer *signer, expectPass bool) *sdk.Result {
|
||||
_, res, _ := SignAndDeliver(t, wasm, []sdk.Msg{msg}, []uint64{signer.acctNum}, []uint64{signer.seq}, expectPass, signer.priv)
|
||||
txGen := app.MakeEncodingConfig().TxConfig
|
||||
_, res, _ := SignAndDeliver(t, txGen, wasm, []sdk.Msg{msg}, []uint64{signer.acctNum}, []uint64{signer.seq}, expectPass, signer.priv)
|
||||
if expectPass {
|
||||
signer.seq++
|
||||
}
|
||||
|
||||
@@ -2,18 +2,17 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd, _ := NewRootCmd()
|
||||
if err := Execute(rootCmd); err != nil {
|
||||
switch e := err.(type) {
|
||||
case server.ErrorCode:
|
||||
os.Exit(e.Code)
|
||||
default:
|
||||
// TODO: enable this for 0.41
|
||||
//switch e := err.(type) {
|
||||
//case server.ErrorCode:
|
||||
// os.Exit(e.Code)
|
||||
//default:
|
||||
os.Exit(1)
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -4,7 +4,7 @@ go 1.15
|
||||
|
||||
require (
|
||||
github.com/CosmWasm/go-cosmwasm v0.11.0
|
||||
github.com/cosmos/cosmos-sdk v0.34.4-0.20201016130402-6e569e125571
|
||||
github.com/cosmos/cosmos-sdk v0.40.0-rc1
|
||||
github.com/cosmos/iavl v0.15.0-rc4
|
||||
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b
|
||||
github.com/gogo/protobuf v1.3.1
|
||||
|
||||
3
go.sum
3
go.sum
@@ -106,6 +106,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cosmos/cosmos-sdk v0.34.4-0.20201016130402-6e569e125571 h1:S8nqAPT01CVOC6jEnRYGHySkpezC8lu6Xt3dfnei95M=
|
||||
github.com/cosmos/cosmos-sdk v0.34.4-0.20201016130402-6e569e125571/go.mod h1:4UED4atks+Y3NgLdCFkVqNHdjXTHDO2c+r3ydaFh0QE=
|
||||
github.com/cosmos/cosmos-sdk v0.40.0-rc1 h1:DbM2vbmx9soER38YkdLB5g9d+YhaDlKAl2Pne5RLcEQ=
|
||||
github.com/cosmos/cosmos-sdk v0.40.0-rc1/go.mod h1:4wGruNUDrenXKRl/F7ujW29lTv3C+6/TDWs3QfZZN2Y=
|
||||
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=
|
||||
github.com/cosmos/iavl v0.15.0-rc3 h1:rSm60IFfDCD9qDfvXKEmaJhcv0rB5uCbVlBDKsynxqw=
|
||||
@@ -716,6 +718,7 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed h1:J22ig1FUekjjkmZUM7pTKixYm8DvrYsvrBZdunYeIuQ=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88=
|
||||
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
Reference in New Issue
Block a user