Skip to content

Commit 580bae0

Browse files
committed
core: improved uncle messages
1 parent b19bf3e commit 580bae0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎core/block_processor.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,17 +347,17 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty
347347
for i, uncle := range block.Uncles() {
348348
if uncles.Has(uncle.Hash()) {
349349
// Error not unique
350-
return UncleError("Uncle not unique")
350+
return UncleError("uncle[%d] not unique", i)
351351
}
352352

353353
uncles.Add(uncle.Hash())
354354

355355
if ancestors.Has(uncle.Hash()) {
356-
return UncleError("Uncle is ancestor")
356+
return UncleError("uncle[%d] is ancestor", i)
357357
}
358358

359359
if !ancestors.Has(uncle.ParentHash) {
360-
return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4]))
360+
return UncleError("uncle[%d]'s parent unknown (%x)", i, uncle.ParentHash[0:4])
361361
}
362362

363363
if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash]); err != nil {

0 commit comments

Comments
 (0)