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

[config] move config.ActPool to actpool package refactor #3514

Merged
merged 6 commits into from
Jul 12, 2022

Conversation

millken
Copy link
Contributor

@millken millken commented Jul 11, 2022

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #3513

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@millken millken requested a review from a team as a code owner July 11, 2022 05:37
require.NoError(t, err)
pp, err := poll.NewGovernanceChainCommitteeProtocol(
nil,
committee,
uint64(123456),
func(uint64) (time.Time, error) { return time.Now(), nil },
cfg.Chain.PollInitialCandidatesInterval,
bcf.PollInitialCandidatesInterval,
Copy link
Member

Choose a reason for hiding this comment

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

directly use blockchain.DefaultConfig.PollInitialCandidatesInterval here, no need to define bcf

@@ -312,7 +313,7 @@ func TestValidateActPool(t *testing.T) {
}

func TestValidateMinGasPrice(t *testing.T) {
ap := ActPool{MinGasPriceStr: Default.ActPool.MinGasPriceStr}
ap := actpool.Config{MinGasPriceStr: Default.ActPool.MinGasPriceStr}
Copy link
Member

Choose a reason for hiding this comment

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

move this test to actpool package

"github.com/iotexproject/iotex-core/pkg/log"
"github.com/iotexproject/iotex-core/state"
)

const (
_protocolID = "poll"
// RollDPoSScheme means randomized delegated proof of stake
RollDPoSScheme = "ROLLDPOS"
Copy link
Member

Choose a reason for hiding this comment

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

_rollDPoSScheme no need to export

@Liuhaai Liuhaai changed the title [config] move config.ActPoll to actpool package refactor [config] move config.ActPool to actpool package refactor Jul 11, 2022
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #3514 (3adca9b) into master (a20e489) will decrease coverage by 0.88%.
The diff coverage is 52.17%.

@@            Coverage Diff             @@
##           master    #3514      +/-   ##
==========================================
- Coverage   75.43%   74.54%   -0.89%     
==========================================
  Files         247      251       +4     
  Lines       22845    23117     +272     
==========================================
  Hits        17233    17233              
- Misses       4685     4957     +272     
  Partials      927      927              
Impacted Files Coverage Δ
blockchain/blockchain.go 0.89% <0.00%> (ø)
config/config.go 94.06% <ø> (+9.31%) ⬆️
actpool/config.go 60.00% <60.00%> (ø)
blockchain/config.go 65.78% <65.78%> (ø)
action/protocol/poll/protocol.go 68.13% <66.66%> (-0.35%) ⬇️
actpool/actpool.go 87.09% <100.00%> (ø)
blockchain/filedao/testing.go 59.71% <100.00%> (ø)
state/factory/factory.go 78.91% <100.00%> (ø)
state/factory/statedb.go 79.24% <100.00%> (ø)
pkg/util/httputil/httputil.go 65.00% <0.00%> (-5.00%) ⬇️
... and 2 more

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 74cbc38...3adca9b. Read the comment docs.

@Liuhaai
Copy link
Member

Liuhaai commented Jul 11, 2022

The changes on poll protocol is unrelated to this pr. Pls remove them from here. Other changes looks good for me

@millken
Copy link
Contributor Author

millken commented Jul 12, 2022

The changes on poll protocol is unrelated to this pr. Pls remove them from here. Other changes looks good for me

If no change here, will get an "import cycle not allowed" error on build

@millken millken merged commit 6b6b9af into iotexproject:master Jul 12, 2022
@millken millken deleted the issue3513 branch July 12, 2022 07:23
pocockn added a commit to pocockn/iotex-core that referenced this pull request Jul 19, 2022
* upstream/master: (28 commits)
  [ioctl] Incorrect conversion between integer types (iotexproject#3522)
  [action] fix incorrect conversion between integer types (iotexproject#3545)
  [test] fix TestLoadBlockchainfromDB (iotexproject#3521)
  [ioctl] correct Chinese usage message (iotexproject#3510)
  fix err not hanled (iotexproject#3509)
  add ReadHeaderTimeout (iotexproject#3539)
  [iotcl] Reset config cmd (iotexproject#3496)
  Update gosec.yaml
  Update ci.yaml
  Update analysis.yaml
  Delete gosec.yaml.bak
  Create gosec.yaml
  [config] move config.ActPool to actpool package refactor (iotexproject#3514)
  Update ci.yaml
  Update analysis.yaml
  Update analysis.yaml
  [config] move config.Chain to blockchain package (iotexproject#3511)
  remove circleci (iotexproject#3498)
  [ioctl] Build block bucketlist command line into new ioctl (iotexproject#3469)
  [config] remove  EVMNetworkID() and SetEVMNetworkID() (iotexproject#3503)
  ...
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.

move config.ActPool to actpool package refactor
4 participants