From 6adb189640589732413c097565b0f39f00919b9c Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 3 Jun 2021 13:19:46 +0530 Subject: [PATCH 1/5] accept hyphen in node-dir-prefix flag for testnet and change `node-dir-prefixtoken` to `testtoken` --- simapp/simd/cmd/testnet.go | 2 +- types/coin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index d188253a6324..b701e8f13e5e 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -199,7 +199,7 @@ func InitTestnet( accTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) accStakingTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) coins := sdk.Coins{ - sdk.NewCoin(fmt.Sprintf("%stoken", nodeDirName), accTokens), + sdk.NewCoin(fmt.Sprintf("testtoken"), accTokens), sdk.NewCoin(sdk.DefaultBondDenom, accStakingTokens), } diff --git a/types/coin.go b/types/coin.go index c6675a1c7a19..3cfc58b7b3bb 100644 --- a/types/coin.go +++ b/types/coin.go @@ -634,7 +634,7 @@ func (coins Coins) Sort() Coins { var ( // Denominations can be 3 ~ 128 characters long and support letters, followed by either // a letter, a number or a separator ('/'). - reDnmString = `[a-zA-Z][a-zA-Z0-9/]{2,127}` + reDnmString = `[a-zA-Z][a-zA-Z0-9/-]{2,127}` reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` reSpc = `[[:space:]]*` reDnm *regexp.Regexp From cd47ab396d22470d837058fc3e531a9b5a2ae48a Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 3 Jun 2021 13:29:54 +0530 Subject: [PATCH 2/5] remove unnecessary use of fmt.Sprintf in simapp/simd/cmd/testnet.go --- simapp/simd/cmd/testnet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index b701e8f13e5e..d789c3471f43 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -199,7 +199,7 @@ func InitTestnet( accTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) accStakingTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) coins := sdk.Coins{ - sdk.NewCoin(fmt.Sprintf("testtoken"), accTokens), + sdk.NewCoin("testtoken", accTokens), sdk.NewCoin(sdk.DefaultBondDenom, accStakingTokens), } From d575710c76f311acc4d99bd2fff0d421ec04903b Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 3 Jun 2021 15:29:30 +0530 Subject: [PATCH 3/5] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe9eee18f626..abd920da835d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,6 +142,7 @@ if input key is empty, or input data contains empty key. ### Bug Fixes +* [\#9454](https://github.com/cosmos/cosmos-sdk/pull/9454) Fix testnet command with --node-dir-prefix accepts `-` and change `node-dir-prefix token` to `testtoken`. * (x/gov) [\#8813](https://github.com/cosmos/cosmos-sdk/pull/8813) fix `GET /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits` to include initial deposit * (gRPC) [\#8945](https://github.com/cosmos/cosmos-sdk/pull/8945) gRPC reflection now works correctly. * (keyring) [#\8635](https://github.com/cosmos/cosmos-sdk/issues/8635) Remove hardcoded default passphrase value on `NewMnemonic` From 6959d7783e4fa966496a5e415f22c642fa222b20 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 3 Jun 2021 15:40:57 +0530 Subject: [PATCH 4/5] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abd920da835d..3ee9a07942ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,6 +128,7 @@ if input key is empty, or input data contains empty key. ### Improvements +* [\#9427](https://github.com/cosmos/cosmos-sdk/pull/9427) Move simapp `FundAccount` and `FundModuleAccount` to `x/bank/testutil` * (store) [\#9403](https://github.com/cosmos/cosmos-sdk/pull/9403) Add `RefundGas` function to `GasMeter` interface * (baseapp, types) [\#9390](https://github.com/cosmos/cosmos-sdk/pull/9390) Add current block header hash to `Context` * (x/staking) [\#9423](https://github.com/cosmos/cosmos-sdk/pull/9423) Staking delegations now returns empty list instead of rpc error when no records found. From e0a92a77801f62bdbc94fd57722827a617773dea Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Thu, 3 Jun 2021 15:44:18 +0530 Subject: [PATCH 5/5] remove unrelated changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee9a07942ec..abd920da835d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,7 +128,6 @@ if input key is empty, or input data contains empty key. ### Improvements -* [\#9427](https://github.com/cosmos/cosmos-sdk/pull/9427) Move simapp `FundAccount` and `FundModuleAccount` to `x/bank/testutil` * (store) [\#9403](https://github.com/cosmos/cosmos-sdk/pull/9403) Add `RefundGas` function to `GasMeter` interface * (baseapp, types) [\#9390](https://github.com/cosmos/cosmos-sdk/pull/9390) Add current block header hash to `Context` * (x/staking) [\#9423](https://github.com/cosmos/cosmos-sdk/pull/9423) Staking delegations now returns empty list instead of rpc error when no records found.