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

Clean up tipsets #397

Merged
merged 12 commits into from
May 8, 2020
Merged

Clean up tipsets #397

merged 12 commits into from
May 8, 2020

Conversation

timvermeulen
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Normalization of the Tipset types to all use a lowercase s
  • Tipset::new now doesn't clone block headers, and only clones Cids after the verification is done
  • Tipset::is_empty is removed because tipsets are guaranteed to never be empty
  • FullTipset::new now asserts that the vector of blocks isn't empty which we were already assuming in some places
  • Other minor cleanup

@CLAassistant
Copy link

CLAassistant commented May 6, 2020

CLA assistant check
All committers have signed the CLA.

@ec2
Copy link
Member

ec2 commented May 7, 2020

I had not noticed the casing issue... I'm surprised no ones OCD flared up haha. Good catch!

Copy link
Contributor

@austinabell austinabell left a comment

Choose a reason for hiding this comment

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

Very nice!

So I think the inconsistent casing was due to the spec using both casings interchangably and the go implementations using TipSet... the inconsistency has bugged me and I prefer Tipset.. but I'll defer to other's opinions which is preferred for all

blockchain/blocks/src/tipset.rs Outdated Show resolved Hide resolved
blockchain/blocks/src/tipset.rs Outdated Show resolved Hide resolved
blockchain/blocks/src/tipset.rs Outdated Show resolved Hide resolved
blockchain/chain/src/store/tip_index.rs Show resolved Hide resolved
Copy link
Contributor

@dutterbutter dutterbutter left a comment

Choose a reason for hiding this comment

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

LGTM 🔥🔥🔥

@timvermeulen timvermeulen merged commit 67a25f9 into ChainSafe:master May 8, 2020
@timvermeulen timvermeulen deleted the refactor-tipsets branch May 8, 2020 01: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.

None yet

5 participants