diff --git a/core/scc/lscc/lscc.go b/core/scc/lscc/lscc.go index eea5fb32665..c6b22533ad0 100644 --- a/core/scc/lscc/lscc.go +++ b/core/scc/lscc/lscc.go @@ -627,7 +627,7 @@ func (lscc *LifeCycleSysCC) executeUpgrade(stub shim.ChaincodeStubInterface, cha // have deleted it cdbytes, _ := lscc.getCCInstance(stub, chaincodeName) if cdbytes == nil { - return nil, NotFoundErr(chainName) + return nil, NotFoundErr(chaincodeName) } //we need the cd to compare the version diff --git a/core/scc/lscc/lscc_test.go b/core/scc/lscc/lscc_test.go index 09d07b4c750..a346b8f2624 100644 --- a/core/scc/lscc/lscc_test.go +++ b/core/scc/lscc/lscc_test.go @@ -760,7 +760,7 @@ func TestUpgrade(t *testing.T) { testUpgrade(t, "example02", "0", "example02", "1", path, "") testUpgrade(t, "example02", "0", "example02", "", path, EmptyVersionErr("example02").Error()) testUpgrade(t, "example02", "0", "example02", "0", path, IdenticalVersionErr("example02").Error()) - testUpgrade(t, "example02", "0", "example03", "1", path, NotFoundErr("test").Error()) + testUpgrade(t, "example02", "0", "example03", "1", path, NotFoundErr("example03").Error()) testUpgrade(t, "example02", "0", "example02", "1{}0", path, InvalidVersionErr("1{}0").Error()) testUpgrade(t, "example02", "0", "example*02", "1{}0", path, InvalidChaincodeNameErr("example*02").Error()) testUpgrade(t, "example02", "0", "", "1", path, EmptyChaincodeNameErr("").Error())