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

Evaluate Block Action #367

Merged
merged 14 commits into from Jul 25, 2019

Conversation

@earlbread
Copy link
Member

commented Jul 23, 2019

This implements #319 and replaces #357.

  • IBlockPolicy<T>.BlockAction is added.
  • The type parameter of ActionEvaluation is removed.
  • IBlockPolicy<T>.BlockAction evaluated after Tx evaluation.

@earlbread earlbread added this to the 0.5.0 milestone Jul 23, 2019

@earlbread earlbread self-assigned this Jul 23, 2019

@earlbread earlbread requested review from dahlia and longfin and removed request for dahlia Jul 23, 2019

@earlbread earlbread referenced this pull request Jul 23, 2019
@codecov

This comment has been minimized.

Copy link

commented Jul 23, 2019

Codecov Report

Merging #367 into master will decrease coverage by 0.03%.
The diff coverage is 92.07%.

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
- Coverage   88.31%   88.27%   -0.04%     
==========================================
  Files         193      195       +2     
  Lines       13641    13834     +193     
==========================================
+ Hits        12047    12212     +165     
- Misses       1322     1348      +26     
- Partials      272      274       +2
Impacted Files Coverage Δ
Libplanet.Tests/Common/Action/DumbAction.cs 77.04% <ø> (-1.08%) ⬇️
Libplanet.Tests/TestUtils.cs 80% <100%> (ø) ⬆️
Libplanet/Tx/Transaction.cs 95.73% <100%> (+0.11%) ⬆️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.39% <100%> (+0.1%) ⬆️
Libplanet.Tests/Tx/TransactionTest.cs 92.71% <100%> (ø) ⬆️
Libplanet.Tests/Net/SwarmTest.cs 93.13% <100%> (+0.08%) ⬆️
Libplanet/Blockchain/Policies/BlockPolicy.cs 86.45% <100%> (+0.58%) ⬆️
Libplanet/Blocks/Block.cs 85.15% <100%> (ø) ⬆️
Libplanet.Tests/Blocks/BlockTest.cs 98.02% <100%> (ø) ⬆️
Libplanet.Tests/Blockchain/NullPolicy.cs 100% <100%> (ø) ⬆️
... and 10 more
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
Libplanet/Tx/Transaction.cs Outdated Show resolved Hide resolved
CHANGES.md Show resolved Hide resolved

@earlbread earlbread force-pushed the earlbread:policy-action2 branch from a692965 to 6dfb617 Jul 23, 2019

Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
Libplanet/Net/Swarm.cs Outdated Show resolved Hide resolved
Libplanet/Action/ActionEvaluation.cs Show resolved Hide resolved

@earlbread earlbread force-pushed the earlbread:policy-action2 branch 2 times, most recently from cd770d7 to 1753682 Jul 23, 2019

@earlbread earlbread force-pushed the earlbread:policy-action2 branch from 1753682 to a163137 Jul 24, 2019

@earlbread

This comment has been minimized.

Copy link
Member Author

commented Jul 24, 2019

I rebased this on the current master. Please take a look.

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

Libplanet.Tests/Blockchain/BlockChainTest.cs Outdated Show resolved Hide resolved
Libplanet.Tests/Blockchain/NullPolicy.cs Outdated Show resolved Hide resolved
Libplanet/Action/ActionEvaluation.cs Show resolved Hide resolved
@earlbread

This comment has been minimized.

Copy link
Member Author

commented Jul 24, 2019

I applied review suggestions and made EvaluateActionsPerTx return Tuple instead of ValueTuple to avoid Unity test failures.

@earlbread earlbread force-pushed the earlbread:policy-action2 branch from 8270519 to 2679d40 Jul 25, 2019

@earlbread

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

I amended the last commit without change to restart the pending checks.

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

@dahlia
dahlia approved these changes Jul 25, 2019

@earlbread earlbread merged commit df59b18 into planetarium:master Jul 25, 2019

16 checks passed

WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 92.07% of diff hit (target 88.31%)
Details
codecov/project Absolute coverage decreased by -0.03% but relative coverage increased by +3.75% compared to 19078be
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190725.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

@earlbread earlbread deleted the earlbread:policy-action2 branch Jul 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.