Skip to content

Add one issue command#45

Open
seniakalma wants to merge 5 commits intomainfrom
arseni-add-test-issue1
Open

Add one issue command#45
seniakalma wants to merge 5 commits intomainfrom
arseni-add-test-issue1

Conversation

@seniakalma
Copy link
Collaborator

No description provided.

@seniakalma seniakalma self-assigned this Feb 2, 2026
@seniakalma seniakalma marked this pull request as ready for review February 19, 2026 09:55
@seniakalma seniakalma requested a review from PaulLaux February 19, 2026 09:55
Copy link
Contributor

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

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

Overall good. added comments


/// Like `random`, but the wallet seed is derived from `uniqueness` (e.g. a timestamp)
/// so that each test run gets a deterministic, unique wallet and avoids conflicts with cached blocks.
pub fn random_with_uniqueness(miner_seed_phrase: &String, uniqueness: u64) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid duplication by adding an optional parameter and functionality to random()

Comment on lines +179 to +186
let mut seed_random_bytes = [0u8; 64];
seed_random_bytes[..8].copy_from_slice(&uniqueness.to_le_bytes());
// Fill the rest with a simple deterministic expansion so different uniqueness values
// produce different seeds.
for i in 8..64 {
seed_random_bytes[i] = seed_random_bytes[i % 8].wrapping_add(i as u8);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

just hash the seed to 64 bytes instead of this logic.


/// Like `random`, but the wallet seed is derived from `uniqueness` (e.g. a timestamp)
/// so that each test run gets a deterministic, unique wallet and avoids conflicts with cached blocks.
pub fn random_with_uniqueness(miner_seed_phrase: &String, uniqueness: u64) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

uniqueness is rearly used. let's call it random_seed

@PaulLaux
Copy link
Contributor

Also, please update PR description (all open Prs)

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