MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / bpGetTransactionListOfBlock

Function bpGetTransactionListOfBlock

api/transactions.go:70–84  ·  view source on GitHub ↗
(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)

Source from the content-addressed store, hash-verified

68}
69
70func bpGetTransactionListOfBlock(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) (
71 result interface{}, err error,
72) {
73 params := ctx.Value("_params").(*bpGetTransactionListOfBlockParams)
74 model := models.TransactionsModel{}
75 transactions, pagination, err := model.GetTransactionListOfBlock(params.BlockHeight, params.Page, params.Size)
76 if err != nil {
77 return nil, err
78 }
79 result = &BPGetTransactionListResponse{
80 Transactions: transactions,
81 Pagination: pagination,
82 }
83 return result, nil
84}
85
86type bpGetTransactionByHashParams struct {
87 Hash string `json:"hash"`

Callers

nothing calls this directly

Calls 2

ValueMethod · 0.80

Tested by

no test coverage detected