Skip to content

blockchain: Avoid racy math/rand access.#3480

Merged
davecgh merged 1 commit intodecred:masterfrom
jrick:randrace
Feb 28, 2025
Merged

blockchain: Avoid racy math/rand access.#3480
davecgh merged 1 commit intodecred:masterfrom
jrick:randrace

Conversation

@jrick
Copy link
Member

@jrick jrick commented Feb 28, 2025

Our crypto/rand module has a concurrent-safe integer RNG, so use that instead. A deterministic PRNG is not needed here.

Should fix the race observed by the CI here: https://github.com/decred/dcrd/actions/runs/13578457407/job/37959866456.

Our crypto/rand module has a concurrent-safe integer RNG, so use that instead.
A deterministic PRNG is not needed here.
@davecgh davecgh changed the title internal/blockchain: Avoid racy math/rand access blockchain: Avoid racy math/rand access. Feb 28, 2025
@davecgh davecgh added this to the 2.1.0 milestone Feb 28, 2025
@davecgh davecgh merged commit fc664c0 into decred:master Feb 28, 2025
2 checks passed
@jrick jrick deleted the randrace branch February 28, 2025 15:28
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.

2 participants