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

Remove serializer in Block<T>, RawBlock<T>, Transaction<T>, RawTransaction<T> #751

Merged
merged 6 commits into from Jan 13, 2020

Conversation

@limebell
Copy link
Contributor

limebell commented Jan 8, 2020

This patch removes serializer in Block<T>, RawBlock<T>, Transaction<T> and RawTransaction<T>. Block<T> and Transaction<T>'s ToBencodex() method and FromBencodex() method will to the task.
Additionally RawBlock<T>.Transactions is now IEnumerable<byte[]> instead of IEnumerable.

@limebell limebell requested review from dahlia, longfin and earlbread Jan 8, 2020
@limebell limebell self-assigned this Jan 8, 2020
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
Libplanet/Store/DefaultStore.cs Outdated Show resolved Hide resolved
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from 5504954 to d641576 Jan 8, 2020
@limebell limebell requested review from longfin and earlbread Jan 8, 2020
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from 85635d2 to 2858972 Jan 8, 2020
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
Libplanet.Tests/Common/Action/DumbAction.cs Outdated Show resolved Hide resolved
Libplanet.Tests/Common/Action/DumbAction.cs Outdated Show resolved Hide resolved
Libplanet/Blocks/Block.cs Outdated Show resolved Hide resolved
@limebell limebell dismissed stale reviews from moreal and earlbread via b67a1c7 Jan 9, 2020
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from b67a1c7 to d35b303 Jan 13, 2020
@limebell limebell requested review from dahlia, longfin, earlbread and moreal Jan 13, 2020
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from d35b303 to e965984 Jan 13, 2020
@limebell limebell requested a review from longfin Jan 13, 2020
Copy link
Member

dahlia left a comment

This seems to need to be rebased on the current master.

Libplanet/Blocks/Block.cs Show resolved Hide resolved
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 13, 2020

Codecov Report

Merging #751 into master will increase coverage by 0.11%.
The diff coverage is 88.31%.

@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
+ Coverage   86.27%   86.38%   +0.11%     
==========================================
  Files         223      220       -3     
  Lines       19514    19175     -339     
==========================================
- Hits        16835    16565     -270     
+ Misses       1483     1416      -67     
+ Partials     1196     1194       -2
Impacted Files Coverage Δ
Libplanet/Store/BaseStore.cs 80.64% <ø> (-0.61%) ⬇️
Libplanet/Action/PolymorphicAction.cs 96.07% <100%> (ø) ⬆️
Libplanet.Tests/Tx/TransactionTest.cs 92.19% <100%> (ø) ⬆️
Libplanet/Net/Swarm.cs 85.86% <100%> (-0.02%) ⬇️
Libplanet.Tests/Blocks/BlockTest.cs 98.2% <100%> (ø) ⬆️
Libplanet.Tests/Common/Action/Attack.cs 100% <100%> (ø) ⬆️
Libplanet/Action/AccountStateDeltaImpl.cs 100% <100%> (ø) ⬆️
Libplanet/BencodexExtension.cs 50% <50%> (-50%) ⬇️
Libplanet/Store/DefaultStore.cs 82.8% <55.55%> (-0.77%) ⬇️
Libplanet.Tests/Common/Action/DumbAction.cs 80.76% <66.66%> (-0.72%) ⬇️
... and 9 more
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from 99998c8 to 5b9f482 Jan 13, 2020
@limebell limebell requested review from dahlia and longfin Jan 13, 2020
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
Libplanet/Blocks/RawBlock.cs Outdated Show resolved Hide resolved
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
@limebell limebell force-pushed the limebell:refactor/block-serialize branch from 5b9f482 to 8a81321 Jan 13, 2020
@limebell limebell requested a review from moreal Jan 13, 2020
@moreal
moreal approved these changes Jan 13, 2020
@limebell limebell mentioned this pull request Jan 13, 2020
@dahlia
dahlia approved these changes Jan 13, 2020
@dahlia dahlia merged commit 524209d into planetarium:master Jan 13, 2020
20 checks passed
20 checks passed
benchmarks (macos-latest)
Details
dist
Details
benchmarks (ubuntu-18.04)
Details
benchmarks (windows-latest)
Details
docs
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 88.31% of diff hit (target 86.27%)
Details
codecov/project 86.38% (+0.11%) compared to a655e18
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20200113.9 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
Projects
None yet
5 participants
You can’t perform that action at this time.