diff --git a/process/dataProcessor.go b/process/dataProcessor.go index 0656667..d62fe32 100644 --- a/process/dataProcessor.go +++ b/process/dataProcessor.go @@ -51,8 +51,7 @@ func NewDataProcessor( } dp.operationHandlers = map[string]func(marshalledData []byte) error{ - outport.TopicSaveBlock: dp.saveBlock, - outport.TopicRevertIndexedBlock: dp.revertBlock, + outport.TopicSaveBlock: dp.saveBlock, } return dp, nil @@ -158,21 +157,6 @@ func (dp *dataProcessor) handleShardOutportBlock(outportBlock *outport.OutportBl return dp.outportBlocksPool.PutBlock(headerHash, shardOutportBlock) } -func (dp *dataProcessor) revertBlock(marshalledData []byte) error { - blockData := &outport.BlockData{} - err := dp.marshaller.Unmarshal(blockData, marshalledData) - if err != nil { - return err - } - - err = dp.publisher.PublishBlock(blockData.HeaderHash) - if err != nil { - return fmt.Errorf("failed to publish block: %w", err) - } - - return nil -} - // Close will close the internal writer func (dp *dataProcessor) Close() error { return dp.publisher.Close()