Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Uncle inclusion in block authoring. #578

Merged
merged 13 commits into from Mar 5, 2016
Merged

Uncle inclusion in block authoring. #578

merged 13 commits into from Mar 5, 2016

Conversation

gavofyork
Copy link
Contributor

No description provided.

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 2, 2016
@gavofyork gavofyork removed the A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. label Mar 2, 2016
@@ -203,7 +203,7 @@ pub struct Client {
extra_data: RwLock<Bytes>,
}

const HISTORY: u64 = 1000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unintended?

@arkpar arkpar added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 4, 2016
@arkpar
Copy link
Collaborator

arkpar commented Mar 4, 2016

Needs merge

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Mar 4, 2016
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 4, 2016
@gavofyork gavofyork added the A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. label Mar 4, 2016
@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. A8-looksgood 🦄 Pull request is reviewed well. labels Mar 4, 2016
@@ -220,8 +220,8 @@ impl<'x> OpenBlock<'x> {
/// NOTE Will check chain constraints and the uncle number but will NOT check
/// that the header itself is actually valid.
pub fn push_uncle(&mut self, valid_uncle_header: Header) -> Result<(), BlockError> {
if self.block.base.uncles.len() >= self.engine.maximum_uncle_count() {
return Err(BlockError::TooManyUncles(OutOfBounds{min: None, max: Some(self.engine.maximum_uncle_count()), found: self.block.base.uncles.len()}));
if self.block.base.uncles.len() + 1 > self.engine.maximum_uncle_count() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make this a little more readable

@@ -200,6 +201,7 @@ pub struct Client<V = CanonVerifier> where V: Verifier {
panic_handler: Arc<PanicHandler>,

// for sealing...
sealing_enabled: AtomicBool,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add flag for remembering if we should be sealing or not.

@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 4, 2016
gavofyork pushed a commit that referenced this pull request Mar 5, 2016
Uncle inclusion in block authoring.
@gavofyork gavofyork merged commit 504e74a into master Mar 5, 2016
@gavofyork gavofyork deleted the finduncles branch March 5, 2016 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants