Skip to content

Commit 8ca200c

Browse files
authored
ComputerSystemCallResponse add 'RefundTraces' (#279)
1 parent 5355852 commit 8ca200c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

computer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ type ComputerSystemCall struct {
7575

7676
type ComputerSystemCallResponse struct {
7777
ComputerSystemCall
78-
Reason string `json:"reason"`
79-
SubCalls []ComputerSystemCall `json:"subs"`
78+
Reason string `json:"reason"`
79+
SubCalls []ComputerSystemCall `json:"subs"`
80+
RefundTraces []string `json:"refund_traces"`
8081

8182
Error `json:"error"`
8283
}

computer_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ func TestComptuer(t *testing.T) {
5959
assert.Equal("post_process", call.SubCalls[1].Type)
6060
assert.Equal("4QNaXPsXttmD4pt9d2VydT56opyjrRGLqTu4iGc7fkZfCFJXKf1CUy8VeFTuTMEYkRv4RhXpMCni6urikXMBbr42", call.SubCalls[1].Hash)
6161

62+
call, err = GetComputerSystemCall(ctx, "1477df43-7560-37e6-80a0-bee43d20c7ea")
63+
assert.Nil(err)
64+
assert.Equal("1477df43-7560-37e6-80a0-bee43d20c7ea", call.ID)
65+
assert.Equal("main", call.Type)
66+
assert.Equal("failed", call.State)
67+
assert.Len(call.RefundTraces, 1)
68+
6269
extra, err := BuildSystemCallExtra("281474976710657", "ded9e592-111a-4272-a5b7-9e18e627ba3c", false, "1055985c-5759-3839-b5b5-977915ac424d")
6370
assert.Nil(err)
6471
assert.Equal("0001000000000001ded9e592111a4272a5b79e18e627ba3c001055985c57593839b5b5977915ac424d", hex.EncodeToString(extra))

0 commit comments

Comments
 (0)