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 mass limit to mempool #1627

Merged
merged 8 commits into from
Mar 30, 2021
Merged

Add mass limit to mempool #1627

merged 8 commits into from
Mar 30, 2021

Conversation

someone235
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #1627 (a1166d5) into v0.10.0-dev (70f3fa9) will increase coverage by 0.01%.
The diff coverage is 62.50%.

❗ Current head a1166d5 differs from pull request most recent head 2f8b5c4. Consider uploading reports for the commit 2f8b5c4 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           v0.10.0-dev    #1627      +/-   ##
===============================================
+ Coverage        60.40%   60.41%   +0.01%     
===============================================
  Files              533      533              
  Lines            20684    20687       +3     
===============================================
+ Hits             12495    12499       +4     
+ Misses            6234     6233       -1     
  Partials          1955     1955              
Impacted Files Coverage Δ
domain/miningmanager/mempool/mempool.go 54.97% <40.00%> (-0.36%) ⬇️
domain/domain.go 83.33% <100.00%> (-1.29%) ⬇️
domain/miningmanager/factory.go 100.00% <100.00%> (ø)
app/protocol/flows/blockrelay/handle_relay_invs.go 70.00% <0.00%> (+1.25%) ⬆️
.../consensus/processes/blockbuilder/block_builder.go 78.68% <0.00%> (+1.63%) ⬆️

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 70f3fa9...2f8b5c4. Read the comment docs.

func (f *factory) NewMiningManager(consensus externalapi.Consensus, blockMaxMass uint64, acceptNonStd bool) MiningManager {
mempool := mempoolpkg.New(consensus, acceptNonStd)
func (f *factory) NewMiningManager(consensus externalapi.Consensus, blockMaxMass uint64, acceptNonStd bool, params *dagconfig.Params) MiningManager {
mempool := mempoolpkg.New(consensus, acceptNonStd, params)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It appears that the only reason why you're passing the entire params into the mempool is for MaxMassAcceptedByBlock.
You've already passed MaxMassAcceptedByBlock into NewMiningManager, (it's blockMaxMass) so why not just pass that into the mempool instead?

@someone235 someone235 merged commit 3217927 into v0.10.0-dev Mar 30, 2021
@someone235 someone235 deleted the add-mass-limit-to-mempool branch March 30, 2021 12:38
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.

None yet

2 participants