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 sync API #22

Open
alanshaw opened this issue Sep 11, 2023 · 1 comment
Open

Add sync API #22

alanshaw opened this issue Sep 11, 2023 · 1 comment

Comments

@alanshaw
Copy link
Member

I think the majority of operations are async because of the async Block.encode, however it only really is like that because the hash interface used to be async only. It's now optinally async and we're just using sha256 which can be sync in Nodejs. We could switch to an Await<T> interface that allows async/sync operation depending on the environment. This might speed up mutations in Nodejs.

@alanshaw
Copy link
Member Author

Blockstore is async so maybe not as easy as you thought.

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

No branches or pull requests

1 participant