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

Update header caches and builder #930

Merged
merged 5 commits into from
Jan 16, 2021
Merged

Update header caches and builder #930

merged 5 commits into from
Jan 16, 2021

Conversation

austinabell
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Instead of setting caches on build, now lazily sets and also introduces the signature verification cache, to avoid duplicate checks.

Avoiding unnecessary side effects and unnecessary computation

Reference issue to close (if applicable)

Closes

Other information and links

/// stores the hashed bytes of the block after the fist call to `cid()`
#[builder(default)]
cached_bytes: Vec<u8>,
/// stores the hashed bytes of the block after the fist call to `cached_bytes()`
Copy link
Member

Choose a reason for hiding this comment

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

FIST 👊

@austinabell austinabell merged commit a32e19d into main Jan 16, 2021
@austinabell austinabell deleted the austin/headercache branch January 16, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants