Skip to content

Commit

Permalink
Merge pull request #13 from ulbqb/fix/issue578_x_bank
Browse files Browse the repository at this point in the history
Fix/issue578 x bank
  • Loading branch information
ulbqb authored Jul 20, 2022
2 parents c86104d + 2680001 commit bed6651
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion baseapp/block_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
require.Equal(t, []byte("ok"), okValue)
}
// check block gas is always consumed
baseGas := uint64(40043) // baseGas is the gas consumed before tx msg
baseGas := uint64(37352) // baseGas is the gas consumed before tx msg
expGasConsumed := addUint64Saturating(tc.gasToConsume, baseGas)
if expGasConsumed > txtypes.MaxGasWanted {
// capped by gasLimit
Expand Down
4 changes: 2 additions & 2 deletions x/bank/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func (suite *IntegrationTestSuite) TestExportGenesis() {
}

func (suite *IntegrationTestSuite) getTestBalancesAndSupply() ([]types.Balance, sdk.Coins) {
addr2, _ := sdk.AccAddressFromBech32("cosmos1f9xjhxm0plzrh9cskf4qee4pc2xwp0n0556gh0")
addr1, _ := sdk.AccAddressFromBech32("cosmos1t5u0jfg3ljsjrh2m9e47d4ny2hea7eehxrzdgd")
addr2, _ := sdk.AccAddressFromBech32("link1f9xjhxm0plzrh9cskf4qee4pc2xwp0n0p662v8")
addr1, _ := sdk.AccAddressFromBech32("link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl")
addr1Balance := sdk.Coins{sdk.NewInt64Coin("testcoin3", 10)}
addr2Balance := sdk.Coins{sdk.NewInt64Coin("testcoin1", 32), sdk.NewInt64Coin("testcoin2", 34)}

Expand Down
5 changes: 0 additions & 5 deletions x/bank/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ func (suite *IntegrationTestSuite) TestQueryAllBalances() {
suite.Equal(res.Balances.Len(), 1)
suite.NotNil(res.Pagination.NextKey)

// invalid bech32 address
invalidReq := types.NewQueryAllBalancesRequest(sdk.AccAddress(addr.String()[0:10]), pageReq)
_, err = queryClient.AllBalances(gocontext.Background(), invalidReq)
suite.Require().Error(err)

suite.T().Log("query second page with nextkey")
pageReq = &query.PageRequest{
Key: res.Pagination.NextKey,
Expand Down
4 changes: 2 additions & 2 deletions x/bank/legacy/v043/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestMigrateJSON(t *testing.T) {
WithTxConfig(encodingConfig.TxConfig).
WithCodec(encodingConfig.Marshaler)

voter, err := sdk.AccAddressFromBech32("link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh")
voter, err := sdk.AccAddressFromBech32("link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl")
require.NoError(t, err)
bankGenState := &types.GenesisState{
Balances: []types.Balance{
Expand Down Expand Up @@ -59,7 +59,7 @@ func TestMigrateJSON(t *testing.T) {
expected := `{
"balances": [
{
"address": "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh",
"address": "link1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3q4fdzl",
"coins": [
{
"amount": "20",
Expand Down

0 comments on commit bed6651

Please sign in to comment.