1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-16 04:24:56 +02:00

api/message/types.go: Adding TableDelta and TableDeltaRow structs

This commit is contained in:
Henrik Hautakoski 2024-01-07 19:12:39 +01:00
parent 8dbf411b36
commit dc6dd6ae70

View file

@ -80,3 +80,16 @@ func (act ActionTrace) GetData() (map[string]any, error) {
}
return nil, errors.New("failed to convert data to map")
}
type TableDeltaRow struct {
Present bool `json:"present" msgpack:"present"`
Data []byte `json:"data" msgpack:"data"`
RawData []byte `json:"raw_data" msgpack:"raw_data"`
}
type TableDelta struct {
BlockNum uint32 `json:"blocknum" msgpack:"blocknum"`
Timestamp time.Time `json:"blocktimestamp" msgpack:"blocktimestamp"`
Name string `json:"name" msgpack:"name"`
Rows []TableDeltaRow `json:"rows" msgpack:"rows"`
}