bosnet / sebak

SEBAK, the next BOScoin Blockchain
https://devteam.blockchainos.org
GNU General Public License v3.0
44 stars 15 forks source link

Support `leveldb.Snapshot` in jsonrpc #889

Closed spikeekips closed 5 years ago

spikeekips commented 5 years ago

Github Issue

Resolves #888

Background

See #888

Solution

The snapshot version of python example can be found at https://gist.github.com/spikeekips/a914b9747b868caabd8adc4cb53cbbe7#file-jsonrpc-sebak-prior-v0-1-2-py .

This example, https://gist.github.com/spikeekips/cc007f925435a13650f9c5a587b8e0e5 dumps and creates new leveldb.

codecov-io commented 5 years ago

Codecov Report

Merging #889 into master will increase coverage by 0.15%. The diff coverage is 67.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #889      +/-   ##
==========================================
+ Coverage   60.12%   60.28%   +0.15%     
==========================================
  Files         153      154       +1     
  Lines       10839    10975     +136     
==========================================
+ Hits         6517     6616      +99     
- Misses       3558     3591      +33     
- Partials      764      768       +4
Flag Coverage Δ
#integration_tests_long_term 44.02% <18.3%> (-0.26%) :arrow_down:
#integration_tests_node 40% <18.3%> (-0.33%) :arrow_down:
#unittests 48.61% <61.26%> (+0.14%) :arrow_up:
Impacted Files Coverage Δ
lib/errors/errors.go 0% <ø> (ø) :arrow_up:
lib/storage/leveldb.go 58.98% <0%> (-2.91%) :arrow_down:
lib/storage/snapshot.go 0% <0%> (ø)
lib/node/runner/jsonrpc.go 81.91% <80.67%> (-3.42%) :arrow_down:
lib/network/validator_connection_manager.go 86.95% <0%> (+2.76%) :arrow_up:
lib/common/message.go 42.1% <0%> (+10.52%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5157e67...813b2c1. Read the comment docs.