Skip to content

Commit

Permalink
refactor: add signature to dispersePaidBlob API request
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Oct 22, 2024
1 parent 660efdd commit bdcea7f
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 518 deletions.
6 changes: 0 additions & 6 deletions api/clients/disperser_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type DisperserClient interface {
DisperseBlob(ctx context.Context, data []byte, customQuorums []uint8) (*disperser.BlobStatus, []byte, error)
DisperseBlobAuthenticated(ctx context.Context, data []byte, customQuorums []uint8) (*disperser.BlobStatus, []byte, error)
DispersePaidBlob(ctx context.Context, data []byte, customQuorums []uint8) (*disperser.BlobStatus, []byte, error)
DispersePaidBlobAuthenticated(ctx context.Context, data []byte, customQuorums []uint8) (*disperser.BlobStatus, []byte, error)
GetBlobStatus(ctx context.Context, key []byte) (*disperser_rpc.BlobStatusReply, error)
RetrieveBlob(ctx context.Context, batchHeaderHash []byte, blobIndex uint32) ([]byte, error)
}
Expand Down Expand Up @@ -223,11 +222,6 @@ func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, data []
return blobStatus, disperseReply.DisperseReply.GetRequestId(), nil
}

// TODO: implemented in subsequent PR
func (c *disperserClient) DispersePaidBlobAuthenticated(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) {
return nil, nil, api.NewGRPCError(codes.Unimplemented, "not implemented")
}

func (c *disperserClient) GetBlobStatus(ctx context.Context, requestID []byte) (*disperser_rpc.BlobStatusReply, error) {
addr := fmt.Sprintf("%v:%v", c.config.Hostname, c.config.Port)
dialOptions := c.getDialOptions()
Expand Down
6 changes: 0 additions & 6 deletions api/clients/mock/disperser_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ func (c *MockDisperserClient) DisperseBlob(ctx context.Context, data []byte, quo
return status, key, err
}

// TODO: implement in the subsequent PR
func (c *MockDisperserClient) DispersePaidBlobAuthenticated(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) {
return nil, nil, nil

}

// TODO: implement in the subsequent PR
func (c *MockDisperserClient) DispersePaidBlob(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) {
return nil, nil, nil
Expand Down
Loading

0 comments on commit bdcea7f

Please sign in to comment.