Merge commit '2f1b8ff23e5a0400f72ff603da10b849604c6b04' into aslemmer-merge-2f1b8ff23e5a0400f72ff603da10b849604c6b04

This commit is contained in:
Andras Slemmer
2018-04-03 17:10:33 +01:00
2 changed files with 27 additions and 9 deletions

View File

@ -35,7 +35,7 @@ class SignedNodeInfo(val raw: SerializedBytes<NodeInfo>, val signatures: List<Di
fun verified(): NodeInfo {
val nodeInfo = raw.deserialize()
val identities = nodeInfo.legalIdentities.filterNot { it.owningKey is CompositeKey }
require(identities.isNotEmpty()) { "At least one identity with a non-composite key needs to be specified." }
if (identities.size < signatures.size) {
throw SignatureException("Extra signatures. Found ${signatures.size} expected ${identities.size}")
}