-
Notifications
You must be signed in to change notification settings - Fork 812
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
docs: Update Examples with Blockstore #832
Conversation
Codecov Report
@@ Coverage Diff @@
## master #832 +/- ##
=======================================
Coverage 62.09% 62.09%
=======================================
Files 147 147
Lines 25392 25392
=======================================
Hits 15766 15766
Misses 9626 9626 Continue to review full report at Codecov.
|
I don't think examples should recommend to use Also these examples are highly likely to break without there being tests for them. I don't think it makes sense, or time efficient, to manually run each of these every time to verify they are working, so maintenance of them is problematic. |
@braydonf I couldnt figure out how to get a in-memory blockstore without directly calling LevelBlockStore. Because there's nothing like Even |
I think the recommended usage would actually be to save to disk. If you're writing an application, you'll be doing that. |
I don't think this is true in all cases. This is assuming you are syncing all of the blocks. SPV can work fully in memory. You can also have application logic that keeps a rolling buffer of blocks - as new ones come in, delete old ones. Edit: SPV is not relevant here, as the headers are stored in the chaindb and not blockstore |
All of the examples so far run in memory, I was just aiming for consistency. Personally I don't like little demos like this leaving files around my computer. |
Also worth linking to this recent issue. Although this PR is not the solution, that's why I ran these! |
Closed by #846 |
Chain requires Blockstore!
All scripts in
docs/Examples
updated and tested.