Skip to content

Commit

Permalink
Added extended info to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsporn committed Apr 25, 2024
1 parent afcca2e commit c88d908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (b *BlockDAG) shouldAppend(modelBlock *model.Block) (shouldAppend bool, err
func (b *BlockDAG) canAppendToParents(modelBlock *model.Block) (parentsValid bool, err error) {
for _, parent := range modelBlock.ProtocolBlock().ParentsWithType() {
if isBelowRange, isInRange := b.evictionState.BelowOrInActiveRootBlockRange(parent.ID); isBelowRange || isInRange && !b.evictionState.IsActiveRootBlock(parent.ID) {
return false, ierrors.Errorf("parent %s with type %s of block %s is too old", parent.ID, parent.Type, modelBlock.ID())
return false, ierrors.Errorf("parent %s with type %s of block %s is too old (isBelowRange: %t, isInRange: %t, isActiveRootBlock: %t)", parent.ID, parent.Type, modelBlock.ID(), isBelowRange, isInRange, b.evictionState.IsActiveRootBlock(parent.ID))
}
}

Expand Down

0 comments on commit c88d908

Please sign in to comment.