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 Seals to BlockPayload #147

Merged
merged 2 commits into from
Feb 15, 2021
Merged

Conversation

beaugunderson
Copy link
Contributor

@beaugunderson beaugunderson commented Feb 14, 2021

Closes: #148

Description

Implements the Seals property of BlockPayload using the technique used for CollectionGuarantees as a guide.

Some context on Discord.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link
Contributor

@psiemens psiemens left a comment

Choose a reason for hiding this comment

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

Hey @beaugunderson, thanks for adding this!

I added a comment about tests, but the code itself looks great 👍

Also, can you run gofmt and push the changes? Looks like some of the indentation is off in a few places

client/convert/protobuf.go Show resolved Hide resolved
@beaugunderson
Copy link
Contributor Author

@psiemens tests added and gofmt applied 👍

should the potential issue with the Access API be tracked somewhere btw? (the one re: this block among others not having any seals via the explorer or the flow-sdk)

test/entities.go Outdated
@@ -131,8 +131,11 @@ func (g *Blocks) New() *flow.Block {
g.guarantees.New(),
}

seals := []*flow.BlockSeal{}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use the new BlockSeals generator here, similar to g.guarantees above.

I'd probably just add a single seal to each block:

seals := []*flow.BlockSeal{
  g.seals.New(),
}

Thanks for adding the generator, BTW!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@psiemens great, added that (and the corresponding instantiation) 👍

Copy link
Contributor

@psiemens psiemens left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks again

@psiemens psiemens merged commit f92a9a9 into onflow:master Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Seals property of BlockPayload is not implemented
2 participants