mirror of
https://github.com/corda/corda.git
synced 2025-06-06 09:21:47 +00:00
Command toString signers-keys format (#1609)
This commit is contained in:
parent
175e53d3d2
commit
6ddb6c7cc2
@ -4,6 +4,7 @@ package net.corda.core.contracts
|
|||||||
|
|
||||||
import net.corda.core.crypto.SecureHash
|
import net.corda.core.crypto.SecureHash
|
||||||
import net.corda.core.crypto.secureRandomBytes
|
import net.corda.core.crypto.secureRandomBytes
|
||||||
|
import net.corda.core.crypto.toStringShort
|
||||||
import net.corda.core.flows.FlowLogicRef
|
import net.corda.core.flows.FlowLogicRef
|
||||||
import net.corda.core.flows.FlowLogicRefFactory
|
import net.corda.core.flows.FlowLogicRefFactory
|
||||||
import net.corda.core.identity.AbstractParty
|
import net.corda.core.identity.AbstractParty
|
||||||
@ -185,7 +186,7 @@ data class Command<T : CommandData>(val value: T, val signers: List<PublicKey>)
|
|||||||
constructor(data: T, key: PublicKey) : this(data, listOf(key))
|
constructor(data: T, key: PublicKey) : this(data, listOf(key))
|
||||||
|
|
||||||
private fun commandDataToString() = value.toString().let { if (it.contains("@")) it.replace('$', '.').split("@")[0] else it }
|
private fun commandDataToString() = value.toString().let { if (it.contains("@")) it.replace('$', '.').split("@")[0] else it }
|
||||||
override fun toString() = "${commandDataToString()} with pubkeys ${signers.joinToString()}"
|
override fun toString() = "${commandDataToString()} with pubkeys ${signers.map { it.toStringShort() }.joinToString()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A common move command for contract states which can change owner. */
|
/** A common move command for contract states which can change owner. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user