Skip to content

Commit

Permalink
Only one uncle
Browse files Browse the repository at this point in the history
  • Loading branch information
xcthulhu committed Mar 2, 2015
1 parent ba1f4bb commit 080823b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error {
return fmt.Errorf("GasLimit check failed for block %v, %v", block.Header().GasLimit, expl)
}

if len(block.Uncles()) > 1 {
return ValidationError("Block can only contain one uncle (contained %v)", len(block.Uncles()))
}

if block.Time() < parent.Time() {
return ValidationError("Block timestamp not after prev block (%v - %v)", block.Header().Time, parent.Header().Time)
}
Expand Down

0 comments on commit 080823b

Please sign in to comment.