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

Tune lock in BlockChain<T> #217

Merged
merged 3 commits into from
Apr 29, 2019

Conversation

longfin
Copy link
Member

@longfin longfin commented Apr 25, 2019

This PR adjusts the locks on BlockChain<T>.

  • Removed unnecessary writer lock in BlockChain<T>.StageTransactions()
  • Adjust BlockChain<T>.GetState() locks to reduce locking period.

@longfin longfin force-pushed the feature/tune-blockchain-lock branch from 367f092 to 42a969a Compare April 25, 2019 06:13
@longfin longfin requested review from dahlia and earlbread and removed request for dahlia April 25, 2019 06:14
earlbread
earlbread previously approved these changes Apr 25, 2019
@codecov
Copy link

codecov bot commented Apr 25, 2019

Codecov Report

Merging #217 into master will decrease coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
- Coverage    84.1%   83.85%   -0.25%     
==========================================
  Files          75       75              
  Lines        3492     3488       -4     
==========================================
- Hits         2937     2925      -12     
- Misses        555      563       +8
Impacted Files Coverage Δ
Libplanet/Blockchain/BlockChain.cs 98.01% <100%> (-0.03%) ⬇️
Libplanet/Net/Swarm.cs 79.68% <0%> (-0.9%) ⬇️

CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@longfin longfin force-pushed the feature/tune-blockchain-lock branch from bee27da to fbd0f6e Compare April 26, 2019 11:24
CHANGES.md Outdated Show resolved Hide resolved
earlbread
earlbread previously approved these changes Apr 28, 2019
dahlia
dahlia previously approved these changes Apr 29, 2019
@longfin longfin dismissed stale reviews from dahlia and earlbread via 7f9ff17 April 29, 2019 05:21
@longfin longfin force-pushed the feature/tune-blockchain-lock branch from eb2e74b to 7f9ff17 Compare April 29, 2019 05:21
@longfin
Copy link
Member Author

longfin commented Apr 29, 2019

I've rebased (and made some changes related #212 ). cc @dahlia

@longfin longfin force-pushed the feature/tune-blockchain-lock branch from 7f9ff17 to ea5b69c Compare April 29, 2019 05:37
@dahlia dahlia merged commit 241b6b8 into planetarium:master Apr 29, 2019
OnedgeLee pushed a commit to OnedgeLee/libplanet that referenced this pull request Jan 31, 2023
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.

3 participants