Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Dec 2, 2024
1 parent ed48faf commit d8330d0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
5 changes: 0 additions & 5 deletions x/dsmr/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var (
ErrInvalidBlockHeight = errors.New("invalid block height")
ErrInvalidBlockTimestamp = errors.New("invalid block timestamp")
ErrInvalidWarpSignature = errors.New("invalid warp signature")
ErrMissingChunkSignature = errors.New("missing chunk signature")
ErrDuplicateChunkCert = errors.New("duplicate chunk cert")
)

Expand Down Expand Up @@ -282,10 +281,6 @@ func (n *Node[T]) Verify(ctx context.Context, parent Block, block Block) error {
}

for _, chunkCert := range block.ChunkCerts {
if chunkCert.Signature == nil {
return fmt.Errorf("%w: %s", ErrMissingChunkSignature, chunkCert.ChunkID)
}

_, ok, err := n.storage.GetChunkBytes(chunkCert.Expiry, chunkCert.ChunkID)
if err != nil && !errors.Is(err, database.ErrNotFound) {
return fmt.Errorf("failed to get chunk: %w", err)
Expand Down
21 changes: 0 additions & 21 deletions x/dsmr/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1223,27 +1223,6 @@ func Test_Verify_BadBlock(t *testing.T) {
},
wantErr: ErrEmptyBlock,
},
{
name: "missing signature",
blk: func(_ ChunkCertificate, parent Block) Block {
return Block{
ParentID: parent.GetID(),
Height: parent.Height + 1,
Timestamp: parent.Timestamp + 1,
ChunkCerts: []*ChunkCertificate{
{
ChunkReference: ChunkReference{
ChunkID: ids.GenerateTestID(),
Producer: ids.GenerateTestNodeID(),
Expiry: 1,
},
Signature: nil,
},
},
}
},
wantErr: ErrMissingChunkSignature,
},
{
name: "invalid signature",
blk: func(_ ChunkCertificate, parent Block) Block {
Expand Down

0 comments on commit d8330d0

Please sign in to comment.