-
Notifications
You must be signed in to change notification settings - Fork 352
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
Problem: halt-height is not deterministic #998
Conversation
Solution: - port the fix from sdk: cosmos/cosmos-sdk#16639
Signed-off-by: yihuang <[email protected]>
case app.haltHeight > 0 && uint64(req.Header.Height) > app.haltHeight: | ||
halt = true | ||
|
||
case app.haltTime > 0 && req.Header.Time.Unix() > int64(app.haltTime): |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
// backport: https://github.com/cosmos/cosmos-sdk/pull/16639 | ||
var halt bool | ||
switch { | ||
case app.haltHeight > 0 && uint64(req.Header.Height) > app.haltHeight: |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
Codecov Report
@@ Coverage Diff @@
## master #998 +/- ##
==========================================
- Coverage 33.07% 24.03% -9.04%
==========================================
Files 126 126
Lines 19999 20013 +14
==========================================
- Hits 6615 4811 -1804
- Misses 12327 14545 +2218
+ Partials 1057 657 -400
Flags with carried forward coverage won't be shown. Click here to find out more.
|
if err := app.Close(); err != nil { | ||
app.Logger().Info("close application failed", "error", err) | ||
} | ||
panic("halt application") |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)