Skip to content

Commit

Permalink
use append name/arg order
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Apr 25, 2024
1 parent b3add97 commit a504839
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/algod/api/server/v2/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func getAppIndexFromTxn(txn transactions.SignedTxnWithAD) uint64 {
return appIndex
}

func getLogsFromTxns(txns []transactions.SignedTxnWithAD, blockLogs []model.AppCallLogs, outerTxnID string) []model.AppCallLogs {
func appendLogsFromTxns(blockLogs []model.AppCallLogs, txns []transactions.SignedTxnWithAD, outerTxnID string) []model.AppCallLogs {

for _, txn := range txns {
if len(txn.EvalDelta.Logs) > 0 {
Expand All @@ -760,7 +760,7 @@ func getLogsFromTxns(txns []transactions.SignedTxnWithAD, blockLogs []model.AppC
)
}

blockLogs = getLogsFromTxns(txn.EvalDelta.InnerTxns, blockLogs, outerTxnID)
blockLogs = appendLogsFromTxns(blockLogs, txn.EvalDelta.InnerTxns, outerTxnID)
}

return blockLogs
Expand Down Expand Up @@ -796,7 +796,7 @@ func (v2 *Handlers) GetBlockLogs(ctx echo.Context, round uint64) error {
)
}

blockLogs = getLogsFromTxns(txn.EvalDelta.InnerTxns, blockLogs, txid)
blockLogs = appendLogsFromTxns(blockLogs, txn.EvalDelta.InnerTxns, txid)
}

response := model.BlockLogsResponse{Logs: blockLogs}
Expand Down

0 comments on commit a504839

Please sign in to comment.