Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/goal/box.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
reportInfof("Name: %s", boxName)

// Print box value
reportInfof("Value: %s", encodeBytesAsAppCallBytes(box.Value))
reportInfof("Value: %s", encodeBytesAsAppCallBytes(*box.Value))

Check warning on line 95 in cmd/goal/box.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/box.go#L95

Added line #L95 was not covered by tests
},
}

Expand Down Expand Up @@ -124,7 +124,7 @@
for _, descriptor := range response.Boxes {
name := encodeBytesAsAppCallBytes(descriptor.Name)
if boxValues {
reportInfof("%s : %s", name, encodeBytesAsAppCallBytes(descriptor.Value))
reportInfof("%s : %s", name, encodeBytesAsAppCallBytes(*descriptor.Value))

Check warning on line 127 in cmd/goal/box.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/box.go#L127

Added line #L127 was not covered by tests
} else {
reportInfoln(name)
}
Expand Down
3 changes: 1 addition & 2 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4154,8 +4154,7 @@
"description": "Box name and its content.",
"type": "object",
"required": [
"name",
"value"
"name"
],
"properties": {
"round": {
Expand Down
3 changes: 1 addition & 2 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,7 @@
}
},
"required": [
"name",
"value"
"name"
],
"type": "object"
},
Expand Down
190 changes: 95 additions & 95 deletions daemon/algod/api/server/v2/generated/data/routes.go

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions daemon/algod/api/server/v2/generated/experimental/routes.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion daemon/algod/api/server/v2/generated/model/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

200 changes: 100 additions & 100 deletions daemon/algod/api/server/v2/generated/nonparticipating/private/routes.go

Large diffs are not rendered by default.

358 changes: 179 additions & 179 deletions daemon/algod/api/server/v2/generated/nonparticipating/public/routes.go

Large diffs are not rendered by default.

207 changes: 103 additions & 104 deletions daemon/algod/api/server/v2/generated/participating/private/routes.go

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions daemon/algod/api/server/v2/generated/participating/public/routes.go

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions daemon/algod/api/server/v2/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,8 @@
for key, value := range boxes {
box := model.Box{Name: []byte(key[kvPrefixLen:])}
if values {
box.Value = []byte(value)
boxArray := []byte(value)
box.Value = &boxArray

Check warning on line 1832 in daemon/algod/api/server/v2/handlers.go

View check run for this annotation

Codecov / codecov/patch

daemon/algod/api/server/v2/handlers.go#L1831-L1832

Added lines #L1831 - L1832 were not covered by tests
}
responseBoxes = append(responseBoxes, box)
}
Expand Down Expand Up @@ -1871,7 +1872,7 @@
response := model.BoxResponse{
Round: omitEmpty(uint64(lastRound)),
Name: boxName,
Value: value,
Value: &value,

Check warning on line 1875 in daemon/algod/api/server/v2/handlers.go

View check run for this annotation

Codecov / codecov/patch

daemon/algod/api/server/v2/handlers.go#L1875

Added line #L1875 was not covered by tests
}
return ctx.JSON(http.StatusOK, response)
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-go/restAPI/other/appsRestAPI_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ end:
currentRoundAfterBoxes, err := testClient.CurrentRound()
a.NoError(err)
a.Equal(boxTest.name, boxResponse.Name)
a.Equal(boxTest.value, boxResponse.Value)
a.Equal(boxTest.value, *boxResponse.Value)
// To reduce flakiness, only check the round from boxes is within a range.
a.GreaterOrEqual(*boxResponse.Round, currentRoundBeforeBoxes)
a.LessOrEqual(*boxResponse.Round, currentRoundAfterBoxes)
Expand Down
Loading