Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: running benchmarks panics with "panic: invalid denom: COINZ_0" #8433

Closed
4 tasks done
odeke-em opened this issue Jan 26, 2021 · 0 comments · Fixed by #8435
Closed
4 tasks done

types: running benchmarks panics with "panic: invalid denom: COINZ_0" #8433

odeke-em opened this issue Jan 26, 2021 · 0 comments · Fixed by #8435
Assignees
Labels
T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@odeke-em
Copy link
Collaborator

Summary of Bug

If I go into types and try to run benchmarks, it panics

$ go test -run=^$ -bench=.
# github.com/keybase/go-keychain
cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here
panic: invalid denom: COINZ_0

goroutine 15 [running]:
github.com/cosmos/cosmos-sdk/types.NewCoin(0xc000044100, 0x7, 0xc00008a460, 0x1, 0x1, 0xc000044100)
	/Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/types/coin.go:23 +0x97
github.com/cosmos/cosmos-sdk/types.BenchmarkCoinsAdditionIntersect.func1.1(0xc0000d0b40)
	/Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/types/coin_benchmark_test.go:19 +0x175
testing.(*B).runN(0xc0000d0b40, 0x1)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/benchmark.go:192 +0xeb
testing.(*B).run1.func1(0xc0000d0b40)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/benchmark.go:232 +0x57
created by testing.(*B).run1
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/benchmark.go:225 +0x7f
exit status 2
FAIL	github.com/cosmos/cosmos-sdk/types	0.843s

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@odeke-em odeke-em added T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Jan 26, 2021
@odeke-em odeke-em self-assigned this Jan 26, 2021
odeke-em added a commit that referenced this issue Jan 26, 2021
Instead of
    COINZ_%d
use
    coinZ%d
which is the syntax accepted by types.ParseCoin, to generate
coins to use in benchmarking.

Fixes #8433
alessio pushed a commit that referenced this issue Jan 28, 2021
Instead of
    COINZ_%d
use
    coinZ%d
which is the syntax accepted by types.ParseCoin, to generate
coins to use in benchmarking.

Fixes #8433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant