isRelevant didn't work for composite ownership, it's now fixed (under certain assumptions). (#3967)

This commit is contained in:
Konstantinos Chalkias
2018-09-19 10:03:16 +01:00
committed by GitHub
parent c9bce39696
commit 7b4c4803b9
2 changed files with 13 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import co.paralleluniverse.fibers.Suspendable
import co.paralleluniverse.strands.Strand
import net.corda.core.contracts.*
import net.corda.core.crypto.SecureHash
import net.corda.core.crypto.containsAny
import net.corda.core.internal.*
import net.corda.core.messaging.DataFeed
import net.corda.core.node.ServicesForResolution
@ -433,7 +434,7 @@ class NodeVaultService(
is OwnableState -> (state.participants.map { it.owningKey } + state.owner.owningKey).toSet()
else -> state.participants.map { it.owningKey }
}
return keysToCheck.any { it in myKeys }
return keysToCheck.any { it.containsAny(myKeys) }
}
@Throws(VaultQueryException::class)