-
Notifications
You must be signed in to change notification settings - Fork 324
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.Chain to blockchain package #3511
Conversation
@@ -26,12 +27,16 @@ import ( | |||
"github.com/iotexproject/iotex-core/blockchain/blockdao" | |||
"github.com/iotexproject/iotex-core/blockchain/filedao" | |||
"github.com/iotexproject/iotex-core/blockchain/genesis" | |||
"github.com/iotexproject/iotex-core/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the main blocking dependency this PR tries to get rid of
} | ||
return "" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to blockchain/config.go
Codecov Report
@@ Coverage Diff @@
## master #3511 +/- ##
==========================================
- Coverage 75.43% 74.53% -0.90%
==========================================
Files 247 250 +3
Lines 22845 23123 +278
==========================================
+ Hits 17233 17235 +2
- Misses 4685 4961 +276
Partials 927 927
Continue to review full report at Codecov.
|
blockchain/blockchain.go
Outdated
) | ||
|
||
func generateRandomKey(scheme string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's only used in config.go
, so it shouldn't be placed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
blockchain/blockchain.go
Outdated
log.S().Panicf("Failed to execute blockchain creation option %p: %v", opt, err) | ||
} | ||
} | ||
if chain.pubSubManager == nil { | ||
chain.pubSubManager = NewPubSub(200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have pubsubManager be nil
if no option is passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, if no option, it's nil
, so create according to default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After offline discussion, the buffersize of pubManager is added into the config of blockchain.
* 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) ...
Description
as title
Fixes #(issue)
Type of change
Please delete options that are not relevant.
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
Checklist: