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 random #142

Merged
merged 5 commits into from
Feb 9, 2023
Merged

fix random #142

merged 5 commits into from
Feb 9, 2023

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Feb 9, 2023

wasm smoldot node always started with same peer id
because .slice() (clone) and .subarray() (mutable reference) were confused
so randomness was not written back to wasm memory

@turuslan turuslan requested a review from tomaka as a code owner February 9, 2023 16:14
@tomaka
Copy link
Contributor

tomaka commented Feb 9, 2023

Thank you!

This is why I hate JavaScript. I remember thinking about this, but the documentation says "a shallow copy". What the hell does "a shallow copy" even mean in the context of Uint8Array if not that you're sharing the underlying buffer? Anyway. EDIT: I've just noticed that this is only in the French documentation and not the English one

@tomaka
Copy link
Contributor

tomaka commented Feb 9, 2023

I've taken the liberty to push a commit with an update to the CHANGELOG.

tomaka
tomaka previously approved these changes Feb 9, 2023
@tomaka tomaka enabled auto-merge (squash) February 9, 2023 18:05
@tomaka tomaka merged commit 3ae4534 into smol-dot:main Feb 9, 2023
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