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

fix: panic: Int64() out of bound on DelegatorShares comparison #31

Conversation

AndreMiras
Copy link
Contributor

The /metrics/validators was crashing with:

panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3

Closes #20

The `/metrics/validators` was crashing with:
```
panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3
```
Closes solarlabsteam#20
@AndreMiras AndreMiras force-pushed the feature/fix_validators_int64_out_of_bound branch from a03ab9e to 160b02a Compare February 14, 2023 21:08
@freak12techno freak12techno merged commit 3773a8f into solarlabsteam:master Feb 21, 2023
@AndreMiras AndreMiras deleted the feature/fix_validators_int64_out_of_bound branch February 21, 2023 11:12
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 this pull request may close these issues.

panic: Int64() out of bound for Rebus
2 participants