OpenAtomFoundation / xupercore

The kernel of xuperchain.
Apache License 2.0
61 stars 47 forks source link

Parachain: fix the bug when reloading a chain existed. #222

Closed aucusaga closed 3 years ago

aucusaga commented 3 years ago

Fix the panic occurred when the engine tries to reload a para-chain that has been created before, as a consequence of the leveldb database instance hasn't closed while a new duplicate one willing to be made.

codecov-commenter commented 3 years ago

Codecov Report

Merging #222 (7046d7e) into master (b21e379) will decrease coverage by 0.56%. The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
- Coverage   47.96%   47.40%   -0.57%     
==========================================
  Files         133      133              
  Lines       11341    11371      +30     
==========================================
- Hits         5440     5390      -50     
- Misses       4782     4859      +77     
- Partials     1119     1122       +3     
Impacted Files Coverage Δ
kernel/engines/xuperos/chain.go 48.13% <0.00%> (-1.87%) :arrow_down:
bcs/ledger/xledger/utils/utils.go 38.23% <28.57%> (-0.83%) :arrow_down:
kernel/engines/xuperos/chainmgmt.go 7.84% <0.00%> (-39.22%) :arrow_down:
kernel/engines/xuperos/engine.go 44.91% <0.00%> (-17.80%) :arrow_down:
...el/engines/xuperos/asyncworker/asyncworker_impl.go 47.48% <0.00%> (-4.32%) :arrow_down:
bcs/consensus/tdpos/tdpos.go 43.91% <0.00%> (-1.31%) :arrow_down:
kernel/consensus/base/driver/chained-bft/smr.go 52.41% <0.00%> (-0.97%) :arrow_down:
bcs/consensus/tdpos/schedule.go 48.40% <0.00%> (-0.92%) :arrow_down:
bcs/contract/xvm/builtin_resolver.go 0.00% <0.00%> (ø)
... and 2 more

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 b21e379...7046d7e. Read the comment docs.