From b1afa2022b35ec6d3d81efd50828ca3604d2499f Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Wed, 18 Nov 2020 04:22:58 -0500 Subject: [PATCH] Improve error for ActorsVersionPredicate --- chain/vm/invoker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/vm/invoker.go b/chain/vm/invoker.go index e22d6965312..a5610736a84 100644 --- a/chain/vm/invoker.go +++ b/chain/vm/invoker.go @@ -36,9 +36,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 }