Skip to content

Commit

Permalink
Collect succeed if actor not exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Jul 8, 2022
1 parent e1d129c commit 10d9d02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions trans/fil_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,16 @@ func (a *filAdapter) Collect(ctx context.Context, chAddr string) error {
if closer != nil {
defer closer()
}
// Check if actor exists
_, err = api.StateGetActor(ctx, ch, types.EmptyTSK)
if err != nil {
if strings.Contains(err.Error(), "actor not found") {
log.Debugf("Channel address %v does not exist", chAddr)
return nil
}
log.Warnf("Fail to get actor state for %v: %v", chAddr, err.Error())
return err
}
// Build message
builder := paych.Message(actors.Version8, from)
msg, err := builder.Collect(ch)
Expand Down

0 comments on commit 10d9d02

Please sign in to comment.