Minor: just print the X.500 name in Party toString not base58 key too.

It's kind of annoying to have the big binary blog in the toString, which is often used for UI/debug purposes.
This commit is contained in:
Mike Hearn 2017-05-18 12:13:03 +02:00
parent 1c92d554e0
commit 3f7acd3c68

View File

@ -28,7 +28,7 @@ import java.security.PublicKey
*/
class Party(val name: X500Name, owningKey: PublicKey) : AbstractParty(owningKey) {
constructor(certAndKey: CertificateAndKey) : this(X500Name(certAndKey.certificate.subjectDN.name), certAndKey.keyPair.public)
override fun toString() = "${owningKey.toBase58String()} ($name)"
override fun toString() = name.toString()
override fun nameOrNull(): X500Name? = name
override fun ref(bytes: OpaqueBytes): PartyAndReference = PartyAndReference(this, bytes)