mirror of
https://github.com/eosswedenorg/thalos
synced 2026-08-27 20:28:14 +02:00
move internal/server/helpers.go to internal/ship/action.go
This commit is contained in:
parent
2ed9518635
commit
67d33a280e
2 changed files with 3 additions and 3 deletions
27
internal/ship/action.go
Normal file
27
internal/ship/action.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package ship
|
||||
|
||||
import (
|
||||
"github.com/shufflingpixels/antelope-go/ship"
|
||||
)
|
||||
|
||||
// convert a ActionTrace to ActionTraceV1
|
||||
func ToActionTraceV1(trace *ship.ActionTrace) *ship.ActionTraceV1 {
|
||||
if trace.V0 != nil {
|
||||
// convert to v1
|
||||
return &ship.ActionTraceV1{
|
||||
ActionOrdinal: trace.V0.ActionOrdinal,
|
||||
CreatorActionOrdinal: trace.V0.CreatorActionOrdinal,
|
||||
Receipt: trace.V0.Receipt,
|
||||
Receiver: trace.V0.Receiver,
|
||||
Act: trace.V0.Act,
|
||||
ContextFree: trace.V0.ContextFree,
|
||||
Elapsed: trace.V0.Elapsed,
|
||||
Console: trace.V0.Console,
|
||||
AccountRamDeltas: trace.V0.AccountRamDeltas,
|
||||
Except: trace.V0.Except,
|
||||
ErrorCode: trace.V0.ErrorCode,
|
||||
ReturnValue: []byte{},
|
||||
}
|
||||
}
|
||||
return trace.V1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue