Skip to content

Commit

Permalink
Merge pull request filecoin-project#4915 from filecoin-project/asr/pr…
Browse files Browse the repository at this point in the history
…edicate-message

Improve error for ActorsVersionPredicate
  • Loading branch information
magik6k authored and bibibong committed Jan 7, 2021
1 parent 88b1caa commit 59928c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chain/vm/invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ type ActorPredicate func(vmr.Runtime, rtt.VMActor) error

func ActorsVersionPredicate(ver actors.Version) ActorPredicate {
return func(rt vmr.Runtime, v rtt.VMActor) error {
nver := actors.VersionForNetwork(rt.NetworkVersion())
if nver != ver {
return xerrors.Errorf("actor %s is a version %d actor; chain only supports actor version %d at height %d", v.Code(), ver, nver, rt.CurrEpoch())
aver := actors.VersionForNetwork(rt.NetworkVersion())
if aver != ver {
return xerrors.Errorf("actor %s is a version %d actor; chain only supports actor version %d at height %d and nver %d", v.Code(), ver, aver, rt.CurrEpoch(), rt.NetworkVersion())
}
return nil
}
Expand Down

0 comments on commit 59928c2

Please sign in to comment.