From 3daa4c6497f48915ad3d156836c24638d1592cbc Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 3 Mar 2016 11:39:00 +0100 Subject: [PATCH] Fix max uncles. --- ethcore/src/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index f5788baba..d05ce51b9 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -220,7 +220,7 @@ 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() { + 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()})); } // TODO: check number