Skip to content

Commit f60f013

Browse files
committed
fix linter
1 parent cb5ed51 commit f60f013

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

process/block/interceptedBlocks/common.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/multiversx/mx-chain-go/sharding"
1111
)
1212

13-
const maxLenMiniBlockReservedField = 10
1413
const maxLenMiniBlockHeaderReservedField = 32
1514

1615
func checkForDuplicateHashes(hashes [][]byte) error {

process/coordinator/process.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -484,40 +484,6 @@ func (tc *transactionCoordinator) processMiniBlocksFromMe(
484484
return nil
485485
}
486486

487-
// TODO consider calling this from VerifyBlockProposal instead of ProcessBlockProposal
488-
func (tc *transactionCoordinator) checkMiniBlock(
489-
miniBlock *block.MiniBlock,
490-
) error {
491-
// there are checks for non existing shard id at interceptors level
492-
493-
if miniBlock.SenderShardID != tc.shardCoordinator.SelfId() && miniBlock.GetReceiverShardID() != tc.shardCoordinator.SelfId() && miniBlock.GetReceiverShardID() != core.AllShardId {
494-
return fmt.Errorf("%w - not valid shard ids: block type: %s, sender shard id: %d, receiver shard id: %d",
495-
process.ErrInvalidShardId,
496-
miniBlock.Type,
497-
miniBlock.SenderShardID,
498-
miniBlock.ReceiverShardID)
499-
}
500-
501-
if miniBlock.GetType() == block.PeerBlock &&
502-
(miniBlock.GetSenderShardID() != core.MetachainShardId || miniBlock.GetReceiverShardID() != core.AllShardId) {
503-
return fmt.Errorf("%w - peer blocks: block type: %s, sender shard id: %d, receiver shard id: %d",
504-
process.ErrInvalidShardId,
505-
miniBlock.Type,
506-
miniBlock.SenderShardID,
507-
miniBlock.ReceiverShardID)
508-
}
509-
510-
if miniBlock.GetType() != block.PeerBlock && miniBlock.GetReceiverShardID() == core.AllShardId {
511-
return fmt.Errorf("%w - invalid all shard ids: block type: %s, sender shard id: %d, receiver shard id: %d",
512-
process.ErrInvalidShardId,
513-
miniBlock.Type,
514-
miniBlock.SenderShardID,
515-
miniBlock.ReceiverShardID)
516-
}
517-
518-
return nil
519-
}
520-
521487
func (tc *transactionCoordinator) processMiniBlocksToMe(
522488
header data.HeaderHandler,
523489
body *block.Body,

0 commit comments

Comments
 (0)