mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-19 04:50:02 +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
|
|
@ -1,27 +0,0 @@
|
|||
package server
|
||||
|
||||
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
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ func (processor *ShipProcessor) processTransactionTrace(log *log.Entry, blockNum
|
|||
// Actions
|
||||
for _, actionTraceVar := range trace.ActionTraces {
|
||||
|
||||
actionTrace := toActionTraceV1(actionTraceVar)
|
||||
actionTrace := ship_helper.ToActionTraceV1(actionTraceVar)
|
||||
actMsg := processor.proccessActionTrace(logger, actionTrace)
|
||||
if actMsg != nil {
|
||||
actMsg.TxID = trace.ID.String()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue