From 41e287de2a69526d1b2783bf95e6715a33968f5d Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 30 Apr 2024 12:52:43 +0300 Subject: [PATCH] fix linter checks --- process/dataProcessor.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/process/dataProcessor.go b/process/dataProcessor.go index cb70f60..a38b53b 100644 --- a/process/dataProcessor.go +++ b/process/dataProcessor.go @@ -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 } @@ -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 }