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

Add a comment to describe the writing 0 scenario #127

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

mohanson
Copy link
Collaborator

No description provided.

src/syscalls/native.rs Outdated Show resolved Hide resolved
@xxuejie
Copy link
Collaborator

xxuejie commented Nov 18, 2024

Personally, I prefer that no shortcuts are added here.

The discussed shortcut should be a syscall-level thing, but ckb-std is just one library that works on top of the syscall. By putting shortcuts here, I fear that it might become a hidden syscall knowledge that every other library out there needs to mimic. When we are designing a new set of syscalls, we should definitely avoid things like this.

@mohanson
Copy link
Collaborator Author

Personally, I prefer that no shortcuts are added here.

The discussed shortcut should be a syscall-level thing, but ckb-std is just one library that works on top of the syscall. By putting shortcuts here, I fear that it might become a hidden syscall knowledge that every other library out there needs to mimic. When we are designing a new set of syscalls, we should definitely avoid things like this.

I submitted a commit to roll back the changes, and added a comment to additionally describe the writing 0 scenario.

@mohanson mohanson changed the title Early return success when writing 0 Add a comment to describe the writing 0 scenario Nov 18, 2024
@mohanson mohanson requested a review from XuJiandong November 18, 2024 03:12
@mohanson mohanson merged commit 42d6cea into nervosnetwork:master Nov 18, 2024
1 check passed
@mohanson mohanson deleted the write_0 branch November 18, 2024 03:20
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.

3 participants