Skip to content

Commit b1eec2b

Browse files
committed
[FAB-10407] Fix an errMsg in vscc (cc deploy/upgr.)
Currently, during a chaincode deploy or upgrade, when more than the required number of entries present in the lscc write set, vscc throws the following error "LSCC can only issue a single putState upon deploy/upgrade" This CR differentiate the error message (for deploy and upgrade) by either specifying "deploy" or "upgrade" but not both Change-Id: If2cff9770ae83871cb904d2a2d203ecd51c6d0d0 Signed-off-by: senthil <cendhu@gmail.com>
1 parent 33aeb75 commit b1eec2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/handlers/validation/builtin/validation_logic.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ func (vscc *ValidatorOneValidSignature) ValidateLSCCInvocation(
535535
} else {
536536
// there can only be a single ledger write
537537
if len(lsccrwset.Writes) != 1 {
538-
return policyErr(fmt.Errorf("LSCC can only issue a single putState upon deploy/upgrade"))
538+
return policyErr(fmt.Errorf("LSCC can only issue a single putState upon deploy"))
539539
}
540540
}
541541

@@ -584,7 +584,7 @@ func (vscc *ValidatorOneValidSignature) ValidateLSCCInvocation(
584584
} else {
585585
// there can only be a single ledger write
586586
if len(lsccrwset.Writes) != 1 {
587-
return policyErr(fmt.Errorf("LSCC can only issue a single putState upon deploy/upgrade"))
587+
return policyErr(fmt.Errorf("LSCC can only issue a single putState upon upgrade"))
588588
}
589589
}
590590

0 commit comments

Comments
 (0)