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

longfin
Copy link
Member

@longfin longfin 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 marked this pull request as ready for review July 3, 2019 14:15
@codecov
Copy link

codecov bot 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

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 Show resolved Hide resolved
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
dahlia
dahlia previously approved these changes Jul 3, 2019
Libplanet/Store/IStore.cs Outdated Show resolved Hide resolved
Libplanet.Tests/Blockchain/BlockChainTest.cs Show resolved Hide resolved
Libplanet/Store/IStore.cs Outdated Show resolved Hide resolved
Co-Authored-By: Seunghun Lee <waydi1@gmail.com>
@longfin longfin self-assigned this Jul 4, 2019
@longfin longfin merged commit e959dc8 into planetarium:master Jul 4, 2019
limebell pushed a commit to limebell/libplanet that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

This database exceeded the maximum limit of collection names size: 3000 bytes
3 participants