Skip to content

Fix issue with 32bit architecture on big numbers' random generation #1494

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

Merged
merged 2 commits into from
Mar 23, 2021

Conversation

iltoga
Copy link
Contributor

@iltoga iltoga commented Mar 23, 2021

Fix issue with 32bit architecture on big numbers' random generation

* Fix issue with 32bit architecture on big numbers' random generation
@iltoga iltoga added the BUG Something isn't working label Mar 23, 2021
@iltoga iltoga requested a review from capt4ce March 23, 2021 03:53
@iltoga iltoga requested a review from bzpython as a code owner March 23, 2021 03:53
@iltoga iltoga self-assigned this Mar 23, 2021
idx := 0
for _, peer := range unresolvedPeers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...

Comment on lines 1314 to 1316
idx := 0
for _, peer := range knownPeers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...

Comment on lines 81 to 83
idx := 0
for _, knownPeer := range peers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...

Comment on lines 497 to 499
idx := 0
for _, peer := range knownPeers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...

Comment on lines 369 to 371
idx := 0
for _, peer := range unresolvedPeers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok..

Comment on lines 312 to 314
idx := 0
for _, peer := range resolvedPeers {
if idx == randomIdx {
if uint64(idx) == randomIdx {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this casting should better be performed when we initiate idx := 0 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...

* Fix issue with 32bit architecture on big numbers' random generation
@capt4ce capt4ce merged commit f72a37f into develop Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants