Skip to content
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

Delete an index, tx nonces and state references during chain swapping #329

Merged
merged 5 commits into from Jul 4, 2019

Conversation

Projects
None yet
3 participants
@longfin
Copy link
Member

commented Jul 3, 2019

This PR enables BlockChain<T> to clean up data(index, tx nonces, staterefs) in the previous chain during .Swap(). (resolves #322) To accomplish, it also adds IStore.DeleteNamespace() and LiteDBStore / FileStore implementation.

@longfin longfin force-pushed the longfin:feature/delete-namespace branch from e971028 to 182a753 Jul 3, 2019

@longfin longfin marked this pull request as ready for review Jul 3, 2019

@codecov

This comment has been minimized.

Copy link

commented Jul 3, 2019

Codecov Report

Merging #329 into master will increase coverage by 0.11%.
The diff coverage is 92.98%.

@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
+ Coverage   87.64%   87.75%   +0.11%     
==========================================
  Files         189      189              
  Lines       12711    12768      +57     
==========================================
+ Hits        11140    11205      +65     
+ Misses       1320     1313       -7     
+ Partials      251      250       -1
Impacted Files Coverage Δ
Libplanet.Tests/Net/SwarmTest.cs 92.38% <ø> (ø) ⬆️
Libplanet/Store/BaseStore.cs 100% <ø> (ø) ⬆️
Libplanet.Tests/Store/LiteDBStoreTest.cs 85.71% <ø> (ø) ⬆️
Libplanet.Tests/Store/StoreTracker.cs 50.8% <0%> (-1.7%) ⬇️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.6% <100%> (ø) ⬆️
Libplanet/Blockchain/BlockChain.cs 95.58% <100%> (ø) ⬆️
Libplanet.Tests/Store/StoreTest.cs 98.75% <100%> (+0.07%) ⬆️
Libplanet/Store/FileStore.cs 90.4% <100%> (+0.25%) ⬆️
Libplanet/Store/LiteDBStore.cs 92.6% <100%> (+0.15%) ⬆️
Libplanet/Net/Swarm.cs 78.18% <0%> (+0.87%) ⬆️
... and 1 more
Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved Libplanet/Store/IStore.cs Outdated
Show resolved Hide resolved Libplanet/Store/IStore.cs
Apply suggestions from code review
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
Show resolved Hide resolved Libplanet/Store/IStore.cs Outdated
Show resolved Hide resolved Libplanet.Tests/Blockchain/BlockChainTest.cs
Show resolved Hide resolved Libplanet/Store/IStore.cs Outdated
Apply suggestions from code review
Co-Authored-By: Seunghun Lee <waydi1@gmail.com>

@longfin longfin requested review from earlbread and dahlia Jul 4, 2019

@longfin longfin self-assigned this Jul 4, 2019

@dahlia

dahlia approved these changes Jul 4, 2019

@longfin longfin merged commit e959dc8 into planetarium:master Jul 4, 2019

16 checks passed

WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 92.98% of diff hit (target 87.64%)
Details
codecov/project 87.75% (+0.11%) compared to 5be73dc
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190704.1 succeeded
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.