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

Fix economic system bugs. #1705

Merged
merged 17 commits into from
May 15, 2019
Merged

Fix economic system bugs. #1705

merged 17 commits into from
May 15, 2019

Conversation

EanCuznaivy
Copy link
Contributor

No description provided.

@vizipi
Copy link

vizipi bot commented May 15, 2019

Pull request analysis by VIZIPI

Below you will find who is the most qualified team member to review your code.
This analysis includes his/her work on the code included in this Pull request, in addition to their experience in code affected by these changes ( partly found within the list of potential missing files below )   Feedback always welcome

Reviewers with knowledge related to these changes

Match % Person Commit Count Common Files
50.00 % Peng Rong 3 2
25.00 % ZhangXin 6 1
25.00 % Eric Shu 5 1
25.00 % samfrb 4 1
25.00 % swk 4 1
25.00 % gldeng 1 1

Potential missing files from this Pull request

files commonly committed with a subset of this pr, but not committed this time.

File Common Rate
src/AElf.Contracts.Election/ElectionContract_Treasury.cs 50.00 % 1 out of 2 times
src/AElf.Contracts.Election/ElectionContract_Election.cs 50.00 % 1 out of 2 times
test/AElf.Contracts.Election.Tests/BVT/ElectionTests.cs 50.00 % 1 out of 2 times

Committed file ranks

File Rank
src/AElf.OS/Jobs/BlockSyncJob.cs 90.88%
src/AElf.Contracts.Profit/ProfitContract.cs 98.18%
src/AElf.Contracts.Profit/ViewMethods.cs 44.39%
src/AElf.Contracts.Consensus.AEDPoS/ViewMethods.cs 70.32%

@codecov
Copy link

codecov bot commented May 15, 2019

Codecov Report

Merging #1705 into dev will decrease coverage by 22.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #1705       +/-   ##
==========================================
- Coverage   74.46%   52.4%   -22.06%     
==========================================
  Files         407     241      -166     
  Lines       18735    8964     -9771     
==========================================
- Hits        13951    4698     -9253     
+ Misses       4784    4266      -518
Impacted Files Coverage Δ
src/AElf.Core/ITaskQueue.cs 0% <0%> (-100%) ⬇️
...ptography/SecretSharing/SecretSharingExtensions.cs 0% <0%> (-100%) ⬇️
src/AElf.OS.Core/AccountOptions.cs 0% <0%> (-100%) ⬇️
...ernel.Consensus/ConsensusRequestMiningEventData.cs 0% <0%> (-100%) ⬇️
...Elf.Kernel.Types/SmartContract/FunctionMetadata.cs 0% <0%> (-100%) ⬇️
src/AElf.Kernel.Types/SmartContract/Resource.cs 0% <0%> (-100%) ⬇️
src/AElf.Types/Helpers/AddressHelpers.cs 0% <0%> (-100%) ⬇️
...lf.Kernel/NewIrreversibleBlockFoundEventHandler.cs 0% <0%> (-100%) ⬇️
src/AElf.Types/ChainHelpers.cs 0% <0%> (-100%) ⬇️
src/AElf.Cryptography/Password.cs 0% <0%> (-100%) ⬇️
... and 275 more

@codecov
Copy link

codecov bot commented May 15, 2019

Codecov Report

Merging #1705 into dev will decrease coverage by 41.5%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             dev   #1705       +/-   ##
=========================================
- Coverage   80.8%   39.3%   -41.51%     
=========================================
  Files        407     312       -95     
  Lines      18735   14571     -4164     
=========================================
- Hits       15139    5727     -9412     
- Misses      3596    8844     +5248
Impacted Files Coverage Δ
src/AElf.Contracts.Profit/ViewMethods.cs 0% <0%> (-100%) ⬇️
src/AElf.Contracts.Consensus.AEDPoS/ViewMethods.cs 4.29% <0%> (-7.67%) ⬇️
src/AElf.Contracts.Profit/ProfitContract.cs 0% <0%> (-100%) ⬇️
src/AElf.Core/ITaskQueue.cs 0% <0%> (-100%) ⬇️
src/AElf.OS.Core/AccountOptions.cs 0% <0%> (-100%) ⬇️
...ernel.Consensus/ConsensusRequestMiningEventData.cs 0% <0%> (-100%) ⬇️
src/AElf.CrossChain.Core/Cache/ChainCacheEntity.cs 0% <0%> (-100%) ⬇️
...Elf.Kernel.Types/SmartContract/FunctionMetadata.cs 0% <0%> (-100%) ⬇️
src/AElf.Kernel.Types/SmartContract/Resource.cs 0% <0%> (-100%) ⬇️
src/AElf.Types/Helpers/AddressHelpers.cs 0% <0%> (-100%) ⬇️
... and 256 more

@todo
Copy link

todo bot commented May 15, 2019

Maybe this should according to date, like every July 1st we increase 2 miners.

// TODO: Maybe this should according to date, like every July 1st we increase 2 miners.
var initialMinersCount = firstRound.RealTimeMinersInformation.Count;
return initialMinersCount.Add(((int) Context.CurrentBlockTime
.Subtract(State.BlockchainStartTimestamp.Value.ToDateTime())
.TotalDays).Div(365).Mul(2));
}


This comment was generated by todo based on a TODO comment in d0b47a7 in #1705. cc @AElfProject.

@AppVeyorBot
Copy link

Build AElf 1.0.0.1799 failed (commit e629851498 by @EanCuznaivy)

@AppVeyorBot
Copy link

Build AElf 1.0.0.1803 failed (commit bb1855c5d8 by @EanCuznaivy)

ProfitsAmount = input.Amount,
IsReleased = true
};
}
else
{
releasedProfitInformation.TotalWeight = profitItem.TotalWeight;
releasedProfitInformation.TotalWeight = totalWeight;
releasedProfitInformation.ProfitsAmount += input.Amount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use safe plus

@EanCuznaivy EanCuznaivy changed the title [WIP] Fix economic system bugs. Fix economic system bugs. May 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/economic-system branch May 15, 2019 12:26
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.

5 participants