Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tweaks to events types #11613

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chain/types/actor_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type SubActorEventFilter struct {
type ActorEventFilter struct {
// Matches events from one of these actors, or any actor if empty.
// For now, this MUST be a Filecoin address.
Addresses []address.Address `json:"addresses"`
Addresses []address.Address `json:"addresses,omitempty"`

// Matches events with the specified key/values, or all events if empty.
// If the value is an empty slice, the filter will match on the key only, accepting any value.
Fields map[string][]ActorEventBlock `json:"fields"`
Fields map[string][]ActorEventBlock `json:"fields,omitempty"`

// Interpreted as an epoch (in hex) or one of "latest" for last mined block, "earliest" for first,
// Optional, default: "latest".
Expand Down Expand Up @@ -65,8 +65,8 @@ type ActorEvent struct {
Height abi.ChainEpoch `json:"height"`

// CID of the tipset that contained the message that produced this event.
TipSetKey cid.Cid `json:"tipset_cid"`
TipSetCid cid.Cid `json:"tipsetCid"`

// CID of message that produced this event.
MsgCid cid.Cid `json:"msg_cid"`
MsgCid cid.Cid `json:"msgCid"`
}
2 changes: 1 addition & 1 deletion chain/types/actor_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestActorEventJson(t *testing.T) {
EmitterAddr: randomF4Addr(t, rng),
Reverted: false,
Height: 1001,
TipSetKey: randomCid(t, rng),
TipSetCid: randomCid(t, rng),
MsgCid: randomCid(t, rng),
}

Expand Down
2 changes: 1 addition & 1 deletion itests/direct_data_onboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func buildActorEventsFromMessages(ctx context.Context, t *testing.T, node v1api.
EmitterAddr: addr,
Reverted: false,
Height: ts.Height(),
TipSetKey: tsCid,
TipSetCid: tsCid,
MsgCid: m.Cid,
})
}
Expand Down
4 changes: 2 additions & 2 deletions node/impl/full/actor_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (a *ActorEvent) SubscribeActorEvents(ctx context.Context, f *types.SubActor
EmitterAddr: ce.EmitterAddr,
Reverted: ce.Reverted,
Height: ce.Height,
TipSetKey: c,
TipSetCid: c,
MsgCid: ce.MsgCid,
}

Expand Down Expand Up @@ -215,7 +215,7 @@ func getCollected(ctx context.Context, f *filter.EventFilter) ([]*types.ActorEve
EmitterAddr: e.EmitterAddr,
Reverted: e.Reverted,
Height: e.Height,
TipSetKey: c,
TipSetCid: c,
MsgCid: e.MsgCid,
}

Expand Down