Skip to content

Commit

Permalink
comments adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami committed Jul 29, 2024
1 parent 02d6ada commit 2cc3f17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions backend/pkg/api/data_access/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,46 @@ type BlockRepository interface {
}

func (d *DataAccessService) GetBlock(ctx context.Context, chainId, block uint64) (*t.BlockSummary, error) {
// @DATA-ACCESS
return d.dummy.GetBlock(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockOverview(ctx context.Context, chainId, block uint64) (*t.BlockOverview, error) {
// @DATA-ACCESS
return d.dummy.GetBlockOverview(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockTransactions(ctx context.Context, chainId, block uint64) ([]t.BlockTransactionTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockTransactions(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockVotes(ctx context.Context, chainId, block uint64) ([]t.BlockVoteTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockVotes(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockAttestations(ctx context.Context, chainId, block uint64) ([]t.BlockAttestationTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockAttestations(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockWithdrawals(ctx context.Context, chainId, block uint64) ([]t.BlockWithdrawalTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockWithdrawals(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockBlsChanges(ctx context.Context, chainId, block uint64) ([]t.BlockBlsChangeTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockBlsChanges(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockVoluntaryExits(ctx context.Context, chainId, block uint64) ([]t.BlockVoluntaryExitTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockVoluntaryExits(ctx, chainId, block)
}

func (d *DataAccessService) GetBlockBlobs(ctx context.Context, chainId, block uint64) ([]t.BlockBlobTableRow, error) {
// @DATA-ACCESS
return d.dummy.GetBlockBlobs(ctx, chainId, block)
}
1 change: 0 additions & 1 deletion backend/pkg/api/handlers/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,6 @@ func (h *HandlerService) InternalGetBlockTransactions(w http.ResponseWriter, r *
returnOk(w, response)
}

// WIP FROM HERE
func (h *HandlerService) InternalGetBlockVotes(w http.ResponseWriter, r *http.Request) {
chainId, block, err := h.validateBlockRequest(r)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion backend/pkg/api/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ type BlockBlobTableRow struct {
Size uint64 `json:"size"`
TransactionHash Hash `json:"transaction_hash"`
Block uint64 `json:"block"`
Data []byte `json:"data"`
Data string `json:"data"`
}

type InternalGetBlockBlobsResponse ApiDataResponse[[]BlockBlobTableRow]

0 comments on commit 2cc3f17

Please sign in to comment.