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

Add GetEpochData API #831

Merged
merged 2 commits into from
Mar 25, 2019
Merged

Add GetEpochData API #831

merged 2 commits into from
Mar 25, 2019

Conversation

lizhefeng
Copy link
Contributor

Given an epoch number, GetEpochData would return the epochData(epoch number, epoch start height, gravity chain start height), block producers' productivity in the epoch, and bp list for the next epoch if it exists.

@lizhefeng lizhefeng requested a review from a team as a code owner March 23, 2019 08:00
api/api_test.go Outdated Show resolved Hide resolved
api/api_test.go Outdated Show resolved Hide resolved
api/api.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

Merging #831 into master will increase coverage by 0.07%.
The diff coverage is 70.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   58.42%   58.49%   +0.07%     
==========================================
  Files         149      149              
  Lines       12169    12221      +52     
==========================================
+ Hits         7110     7149      +39     
- Misses       4104     4110       +6     
- Partials      955      962       +7
Impacted Files Coverage Δ
api/api.go 63.2% <70.14%> (+1.05%) ⬆️
db/trie/extensionnode.go 59.32% <0%> (+1.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bc8415...37d4de6. Read the comment docs.

2 similar comments
@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

Merging #831 into master will increase coverage by 0.07%.
The diff coverage is 70.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   58.42%   58.49%   +0.07%     
==========================================
  Files         149      149              
  Lines       12169    12221      +52     
==========================================
+ Hits         7110     7149      +39     
- Misses       4104     4110       +6     
- Partials      955      962       +7
Impacted Files Coverage Δ
api/api.go 63.2% <70.14%> (+1.05%) ⬆️
db/trie/extensionnode.go 59.32% <0%> (+1.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bc8415...37d4de6. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

Merging #831 into master will increase coverage by 0.07%.
The diff coverage is 70.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   58.42%   58.49%   +0.07%     
==========================================
  Files         149      149              
  Lines       12169    12221      +52     
==========================================
+ Hits         7110     7149      +39     
- Misses       4104     4110       +6     
- Partials      955      962       +7
Impacted Files Coverage Δ
api/api.go 63.2% <70.14%> (+1.05%) ⬆️
db/trie/extensionnode.go 59.32% <0%> (+1.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bc8415...37d4de6. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@6b4621e). Click here to learn what that means.
The diff coverage is 70.14%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #831   +/-   ##
=========================================
  Coverage          ?   58.49%           
=========================================
  Files             ?      149           
  Lines             ?    12221           
  Branches          ?        0           
=========================================
  Hits              ?     7149           
  Misses            ?     4110           
  Partials          ?      962
Impacted Files Coverage Δ
api/api.go 63.2% <70.14%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b4621e...f8badcf. Read the comment docs.

Copy link
Contributor

@zjshen14 zjshen14 left a comment

Choose a reason for hiding this comment

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

Shall we rename GetProductivity to GeEpochMeta, although it's a breaking change?

@@ -478,6 +479,45 @@ var (
numCommitteeBlockProducers: 1,
},
}

getEpochMetaTests = []struct {

Choose a reason for hiding this comment

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

getEpochMetaTests is a global variable (from gochecknoglobals)

@lizhefeng lizhefeng merged commit 48410a1 into iotexproject:master Mar 25, 2019
zjshen14 pushed a commit that referenced this pull request Mar 26, 2019
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.

4 participants