Remove unnecessary TODO

This commit is contained in:
Andrius Dagys 2016-11-15 11:52:58 +00:00
parent 3c4e89e766
commit f4925c0fa9

View File

@ -208,7 +208,6 @@ interface KeyManagementService {
/** Returns a snapshot of the current pubkey->privkey mapping. */
val keys: Map<PublicKey, PrivateKey>
// TODO: make toPrivate return null if not found instead of throwing
fun toPrivate(publicKey: PublicKey) = keys[publicKey] ?: throw IllegalStateException("No private key known for requested public key ${publicKey.toStringShort()}")
fun toKeyPair(publicKey: PublicKey) = KeyPair(publicKey, toPrivate(publicKey))