Skip to content

Commit

Permalink
return BlockLog value from NewBlockLog
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Jan 19, 2024
1 parent bc94490 commit 4909d96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions daemon/algod/api/server/v2/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,8 @@ func (v2 *Handlers) GetBlockTxids(ctx echo.Context, round uint64) error {
return ctx.JSON(http.StatusOK, response)
}

func NewBlockLog(txid string, logs []string, appIndex uint64) *model.BlockLog {
return &model.BlockLog{
func NewBlockLog(txid string, logs []string, appIndex uint64) model.BlockLog {
return model.BlockLog{
Txid: txid,
Logs: convertSlice(logs, func(s string) []byte { return []byte(s) }),
ApplicationIndex: appIndex,
Expand All @@ -755,7 +755,7 @@ func getLogsFromTxns(txns []transactions.SignedTxnWithAD, blockLogs []model.Bloc
if len(txn.EvalDelta.Logs) > 0 {
blockLogs = append(
blockLogs,
*NewBlockLog(outerTxnID, txn.EvalDelta.Logs, getAppIndexFromTxn(txn)),
NewBlockLog(outerTxnID, txn.EvalDelta.Logs, getAppIndexFromTxn(txn)),
)
}

Expand Down Expand Up @@ -790,7 +790,7 @@ func (v2 *Handlers) GetBlockLogs(ctx echo.Context, round uint64) error {
if len(txn.EvalDelta.Logs) > 0 {
blockLogs = append(
blockLogs,
*NewBlockLog(txn.ID().String(), txn.EvalDelta.Logs, getAppIndexFromTxn(txn)),
NewBlockLog(txn.ID().String(), txn.EvalDelta.Logs, getAppIndexFromTxn(txn)),
)
}

Expand Down

0 comments on commit 4909d96

Please sign in to comment.