bosnet / sebak

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

load CommonAccountAddress with sync start #883

Closed anarcher closed 5 years ago

anarcher commented 5 years ago

Github Issue

common/Config.CommonAccountAddress is not loaded when common.Config is created. So sync has to load CommonAccountAddress and add it to Config.CommonAccountAddress

Background

Block height 348204 has inflation-pf operation, and this operation validation needs common.Config.CommonAccountAddress.

Solution

sync/Config loads CommonAccountAddress and add it to common/Config.CommonAccountAddress.

Possible Drawbacks

IHMO, common/Config itself loads it's own attributes when it is created makes sense.

codecov-io commented 5 years ago

Codecov Report

Merging #883 into master will increase coverage by 0.1%. The diff coverage is 57.14%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #883     +/-   ##
========================================
+ Coverage    60.4%   60.5%   +0.1%     
========================================
  Files         153     153             
  Lines       10713   10724     +11     
========================================
+ Hits         6471    6489     +18     
+ Misses       3509    3501      -8     
- Partials      733     734      +1
Flag Coverage Δ
#integration_tests_long_term 44.56% <57.14%> (+0.1%) :arrow_up:
#integration_tests_node 40.44% <57.14%> (+0.06%) :arrow_up:
#unittests 48.63% <50%> (-0.01%) :arrow_down:
Impacted Files Coverage Δ
cmd/sebak/cmd/run.go 57.52% <33.33%> (-0.21%) :arrow_down:
lib/sync/config.go 76.74% <63.63%> (-2.48%) :arrow_down:
lib/network/validator_connection_manager.go 88.53% <0%> (+4.34%) :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 b594652...a9f3384. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #883 into master will increase coverage by 0.1%. The diff coverage is 57.14%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #883     +/-   ##
========================================
+ Coverage    60.4%   60.5%   +0.1%     
========================================
  Files         153     153             
  Lines       10713   10724     +11     
========================================
+ Hits         6471    6489     +18     
+ Misses       3509    3501      -8     
- Partials      733     734      +1
Flag Coverage Δ
#integration_tests_long_term 44.56% <57.14%> (+0.1%) :arrow_up:
#integration_tests_node 40.44% <57.14%> (+0.06%) :arrow_up:
#unittests 48.63% <50%> (-0.01%) :arrow_down:
Impacted Files Coverage Δ
cmd/sebak/cmd/run.go 57.52% <33.33%> (-0.21%) :arrow_down:
lib/sync/config.go 76.74% <63.63%> (-2.48%) :arrow_down:
lib/network/validator_connection_manager.go 88.53% <0%> (+4.34%) :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 b594652...a9f3384. Read the comment docs.

soonkuk commented 5 years ago

LGTM