mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
Ensure NodeInfo
derived properties informeesOfNode
and requireAuthorizers
always return (#4554)
Fail with a more explanatory message if `Fetch.actingParties` is `None` CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
a3228bcea8
commit
85a10e5113
@ -49,8 +49,15 @@ object NodeInfo {
|
||||
def stakeholders: Set[Party]
|
||||
def actingParties: Option[Set[Party]]
|
||||
|
||||
final def requiredAuthorizers: Set[Party] = actingParties.get
|
||||
final def informeesOfNode: Set[Party] = signatories | actingParties.get
|
||||
final def requiredAuthorizers: Set[Party] =
|
||||
actingPartiesOrThrow
|
||||
final def informeesOfNode: Set[Party] =
|
||||
signatories | actingPartiesOrThrow
|
||||
|
||||
private[this] def actingPartiesOrThrow: Set[Party] =
|
||||
actingParties.fold(
|
||||
throw new IllegalStateException(
|
||||
"'Fetch.actingParties' should always be present but is 'None'"))(identity)
|
||||
}
|
||||
|
||||
trait Exercise extends NodeInfo {
|
||||
|
Loading…
Reference in New Issue
Block a user