Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Remy <[email protected]>
  • Loading branch information
paulbrauner-da and remyhaemmerle-da committed Nov 15, 2024
1 parent e41c1e2 commit e8a87f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2403,14 +2403,15 @@ private[lf] object SBuiltin {
List(
check(_.signatories, "signatories"),
// This definition of observers allows observers to lose parties that are signatories
check(c => c.stakeholders -- c.signatories, "observers"),
check(_.nonSignatoryStakeholders, "non signatory stakeholders"),
check(_.keyOpt.map(_.maintainers), "key maintainers"),
check(_.keyOpt.map(_.globalKey.key), "key value"),
).flatten match {
case Nil => k()
case errors =>
Control.Error(
IE.Upgrade(
// TODO(https://github.com/digital-asset/daml/issues/20305): also include the original metadata
IE.Upgrade.ValidationFailed(
coid = coid,
srcTemplateId = original.templateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private[lf] object Speedy {
keyOpt: Option[CachedKey],
) {
val stakeholders: Set[Party] = signatories union observers
lazy val nonSignatoryStakeholders: Set[Party] = stakeholders -- signatories

private[speedy] val any = SValue.SAnyContract(templateId, value)
private[speedy] def arg = value.toNormalizedValue(version)
Expand Down

0 comments on commit e8a87f2

Please sign in to comment.