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

feat: support to control memory usage for header map #2239

Merged

Conversation

yangby-cryptape
Copy link
Collaborator

No description provided.

.header_map
.as_ref()
.cloned()
.unwrap_or_else(Default::default),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.unwrap_or_else(Default::default),
.unwrap_or_default,

@@ -200,6 +205,10 @@ impl Shared {
pub fn store(&self) -> &ChainDB {
&self.store
}

pub fn header_map_config(&self) -> &HeaderMapConfig {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need a fn to get header_map_config here, the config should be passed to Shared::init directly like other config objects

util/app-config/src/configs/network.rs Show resolved Hide resolved
@yangby-cryptape yangby-cryptape force-pushed the pr/control-header-map-limits branch from 7aa5a2d to a7e8cbd Compare August 25, 2020 03:09
@yangby-cryptape yangby-cryptape force-pushed the pr/control-header-map-limits branch from a7e8cbd to 7e387dc Compare August 27, 2020 10:32
@yangby-cryptape yangby-cryptape requested a review from quake August 27, 2020 10:35
@quake
Copy link
Member

quake commented Aug 29, 2020

bors r=quake,keroro520

@nervosnetwork nervosnetwork deleted a comment from bors bot Aug 29, 2020
@quake
Copy link
Member

quake commented Aug 29, 2020

bors r=quake,keroro520

@bors
Copy link
Contributor

bors bot commented Aug 29, 2020

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@quake quake merged commit b64d0de into nervosnetwork:develop Aug 29, 2020
@yangby-cryptape yangby-cryptape deleted the pr/control-header-map-limits branch September 11, 2020 06:15
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.

3 participants