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

Flunky TestValidateParsedMessageAgainstTheParams #251

Closed
RafilxTenfen opened this issue Nov 5, 2024 · 0 comments · Fixed by #252
Closed

Flunky TestValidateParsedMessageAgainstTheParams #251

RafilxTenfen opened this issue Nov 5, 2024 · 0 comments · Fixed by #252

Comments

@RafilxTenfen
Copy link
Contributor

ref https://github.com/babylonlabs-io/babylon/actions/runs/11685988374/job/32540724840

--- FAIL: TestValidateParsedMessageAgainstTheParams (0.08s)
    --- FAIL: TestValidateParsedMessageAgainstTheParams/valid_create_delegation_message (0.00s)
        validate_parsed_message_test.go:837: 
            	Error Trace:	/home/runner/work/babylon/babylon/x/btcstaking/types/validate_parsed_message_test.go:837
            	Error:      	Received unexpected error:
            	            	
            	            	cosmossdk.io/errors.(*Error).Wrapf
            	            		/home/runner/go/pkg/mod/cosmossdk.io/[email protected]/errors.go:155
            	            	github.com/babylonlabs-io/babylon/x/btcstaking/types.ValidateParsedMessageAgainstTheParams
            	            		/home/runner/work/babylon/babylon/x/btcstaking/types/validate_parsed_message.go:[66](https://github.com/babylonlabs-io/babylon/actions/runs/11685988374/job/32540724840#step:6:67)
            	            	github.com/babylonlabs-io/babylon/x/btcstaking/types_test.TestValidateParsedMessageAgainstTheParams.func25
            	            		/home/runner/work/babylon/babylon/x/btcstaking/types/validate_parsed_message_test.go:826
            	            	staking time 62 is out of bounds. Min: 1000, Max: 100000: the BTC staking tx is not valid
            	Test:       	TestValidateParsedMessageAgainstTheParams/valid_create_delegation_message
gitferry added a commit that referenced this issue Nov 6, 2024
Closes #251. The flunky is caused due to the fact that the test uses
`uint16` type for the `stakingTimeBlocks` which is generated in a range
of min and max staking time (0, 100000). However, the max value of
`uint16` is 65535. This PR changes the value of max staking time to
10000 to avoid overflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant