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: addr update #806

Merged
merged 1 commit into from
Oct 17, 2023
Merged

fix: addr update #806

merged 1 commit into from
Oct 17, 2023

Conversation

richard-ramos
Copy link
Member

@richard-ramos richard-ramos commented Oct 16, 2023

Description

Simplifies the code for verifying if there was an update in the listening addresses, and also does the verification regardless of the order of the addresses returned by ListenAddresses()

The reason for this change is that I noticed a case when I received a listenAdd update, containing the same addresses as before, but the order was different.

Also updates the go version to 1.20 (to match go-libp2p)

@status-im-auto
Copy link

status-im-auto commented Oct 16, 2023

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ dde1138 #1 2023-10-16 16:33:14 ~1 min nix-flake 📄log
dde1138 #1 2023-10-16 16:33:15 ~1 min linux 📄log
✖️ dde1138 #1 2023-10-16 16:33:35 ~1 min tests 📄log
✖️ dde1138 #1 2023-10-16 16:33:39 ~1 min tests 📄log
dde1138 #1 2023-10-16 16:34:55 ~2 min android 📄log
dde1138 #1 2023-10-16 16:35:26 ~3 min ios 📄log
✔️ 399af41 #2 2023-10-16 17:43:56 ~1 min nix-flake 📄log
✔️ 399af41 #2 2023-10-16 17:44:23 ~2 min linux 📦deb
✔️ 399af41 #2 2023-10-16 17:45:24 ~3 min tests 📄log
✔️ 399af41 #2 2023-10-16 17:45:50 ~3 min tests 📄log
✔️ 399af41 #2 2023-10-16 17:45:53 ~3 min android 📦tgz
✔️ 399af41 #2 2023-10-16 17:46:32 ~4 min ios 📦tgz
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5137796 #3 2023-10-17 11:40:10 ~1 min nix-flake 📄log
✔️ 5137796 #3 2023-10-17 11:40:45 ~2 min tests 📄log
✔️ 5137796 #3 2023-10-17 11:41:58 ~3 min tests 📄log
✔️ 5137796 #3 2023-10-17 11:41:58 ~3 min ios 📦tgz
✔️ 5137796 #3 2023-10-17 11:42:05 ~3 min linux 📦deb
✔️ 5137796 #3 2023-10-17 11:42:14 ~4 min android 📦tgz
✔️ fb2959c #4 2023-10-17 12:56:44 ~1 min linux 📦deb
✔️ fb2959c #4 2023-10-17 12:57:29 ~1 min tests 📄log
✔️ fb2959c #4 2023-10-17 12:57:40 ~2 min nix-flake 📄log
✔️ fb2959c #4 2023-10-17 12:58:56 ~3 min tests 📄log
✔️ fb2959c #4 2023-10-17 12:59:07 ~3 min android 📦tgz
✔️ fb2959c #4 2023-10-17 12:59:11 ~3 min ios 📦tgz

Copy link
Collaborator

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

LGTM

Did you face some challenge with Math.Rand and hence moved to crypto rand?
Would be nice to know the reasons for the switch.

@richard-ramos
Copy link
Member Author

Did you face some challenge with Math.Rand and hence moved to crypto rand?
Would be nice to know the reasons for the switch.

I changed it due to a deprecation warning from the IDE:

https://tip.golang.org/doc/go1.20

The math/rand package now automatically seeds the global random number generator (used by top-level functions like Float64 and Int) with a random value, and the top-level Seed function has been deprecated. Programs that need a reproducible sequence of random numbers should prefer to allocate their own random source, using rand.New(rand.NewSource(seed)).
Programs that need the earlier consistent global seeding behavior can set GODEBUG=randautoseed=0 in their environment.
The top-level Read function has been deprecated. In almost all cases, crypto/rand.Read is more appropriate.

@richard-ramos richard-ramos merged commit d4abe15 into master Oct 17, 2023
1 check passed
@richard-ramos richard-ramos deleted the fix/addrComparison branch October 17, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants