Skip to content

Commit

Permalink
fix linter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ssd04 committed Apr 30, 2024
1 parent 5477209 commit 41e287d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions process/dataProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ func (dp *dataProcessor) handleMetaOutportBlock(outportBlock *outport.OutportBlo
return fmt.Errorf("failed to put metablock: %w", err)
}

dp.publisher.PublishBlock(headerHash)
err = dp.publisher.PublishBlock(headerHash)
if err != nil {
return fmt.Errorf("failed to publish block: %w", err)
}

return nil
}
Expand Down Expand Up @@ -142,12 +145,11 @@ func (dp *dataProcessor) revertBlock(marshalledData []byte) error {
return err
}

if blockData == nil {
return fmt.Errorf("nil block data")
err = dp.publisher.PublishBlock(blockData.HeaderHash)
if err != nil {
return fmt.Errorf("failed to publish block: %w", err)
}

dp.publisher.PublishBlock(blockData.HeaderHash)

return nil
}

Expand Down

0 comments on commit 41e287d

Please sign in to comment.