1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-18 04:40:03 +02:00

transport/message/types.go: Rename Action field to Name in ActionTrace struct

This commit is contained in:
Henrik Hautakoski 2023-03-07 18:41:41 +01:00
parent 68c21c8ed8
commit 7637b6e16b
2 changed files with 12 additions and 7 deletions

View file

@ -94,9 +94,9 @@ func (processor *ShipProcessor) processTraces(traces []*ship.TransactionTraceV0)
act := message.ActionTrace{
TxID: trace.ID.String(),
Receiver: act_trace.Receiver.String(),
Name: act_trace.Act.Name.String(),
Contract: act_trace.Act.Account.String(),
Action: act_trace.Act.Name.String(),
Receiver: act_trace.Receiver.String(),
HexData: hex.EncodeToString(act_trace.Act.Data),
}
@ -118,9 +118,9 @@ func (processor *ShipProcessor) processTraces(traces []*ship.TransactionTraceV0)
channels := []transport.Channel{
transport.Action{}.Channel(),
transport.Action{Action: act.Action}.Channel(),
transport.Action{Action: act.Name}.Channel(),
transport.Action{Contract: act.Contract}.Channel(),
transport.Action{Action: act.Action, Contract: act.Contract}.Channel(),
transport.Action{Action: act.Name, Contract: act.Contract}.Channel(),
}
for _, channel := range channels {

View file

@ -7,10 +7,15 @@ type HearthBeat struct {
}
type ActionTrace struct {
TxID string `json:"tx_id"`
TxID string `json:"tx_id"`
// Action name
Name string `json:"name"`
// Contract account.
Contract string `json:"contract"`
Receiver string `json:"receiver"`
Contract string `json:"contract"`
Action string `json:"action"`
Data interface{} `json:"data"`
HexData string `json:"hex_data"`
}