bosnet / sebak

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

Save BlockTransaction and BlockOperation when sync #893

Closed anarcher closed 5 years ago

anarcher commented 5 years ago

Github Issue

Background

The operation of above a blockheight is congress-voting-result and it needs to check the operation of congress-voting which should be saved already.

This PR intent that when syncer finishes a block, the operations and the transactions of this block are saved with finishing the block in sync/watcher node.

Solution

when syncer finishes a block, the operations and the transactions of this block are saved with finishing the block in sync/watcher node.

Possible Drawbacks

Without SavingBlockOperations, It makes slower sync/watcher time than with SavingBlockOperations.

anarcher commented 5 years ago

Dependency changes are unrelated?

@Geod24 Oh, I removed this dependency changes in comments :->

codecov-io commented 5 years ago

Codecov Report

Merging #893 into master will decrease coverage by 0.17%. The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #893      +/-   ##
==========================================
- Coverage   60.38%   60.21%   -0.18%     
==========================================
  Files         153      153              
  Lines       10724    10746      +22     
==========================================
- Hits         6476     6471       -5     
- Misses       3512     3532      +20     
- Partials      736      743       +7
Flag Coverage Δ
#integration_tests_long_term 44.32% <41.66%> (-0.15%) :arrow_down:
#integration_tests_node 40.32% <5%> (-0.07%) :arrow_down:
#unittests 48.53% <16.66%> (-0.1%) :arrow_down:
Impacted Files Coverage Δ
lib/sync/types.go 100% <ø> (ø) :arrow_up:
lib/node/runner/finish_ballot.go 43.86% <33.33%> (+0.11%) :arrow_up:
lib/sync/validator.go 57.3% <36.66%> (-3.08%) :arrow_down:
lib/sync/fetcher.go 57.23% <52.38%> (-7.77%) :arrow_down:
lib/sync/try.go 78.57% <0%> (-7.15%) :arrow_down:
lib/metrics/sync.go 88.57% <0%> (-5.72%) :arrow_down:
lib/block/transaction.go 70.12% <0%> (+1.82%) :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 83efb8e...8ce8881. Read the comment docs.

anarcher commented 5 years ago

Ping~