Fix a regression in the shell that was preventing it from fuzzy matching against notary names.

This commit is contained in:
Mike Hearn 2018-11-16 11:37:40 +00:00
parent d138914640
commit 4d2d9b8304
2 changed files with 3 additions and 2 deletions

View File

@ -72,7 +72,8 @@ object JacksonSupport {
override val isFullParties: Boolean = false) : PartyObjectMapper, ObjectMapper(factory) {
override fun wellKnownPartyFromX500Name(name: CordaX500Name): Party? = rpc.wellKnownPartyFromX500Name(name)
override fun partyFromKey(owningKey: PublicKey): Party? = rpc.partyFromKey(owningKey)
override fun partiesFromName(query: String) = rpc.partiesFromName(query, fuzzyIdentityMatch)
// Second parameter is exactMatch, so we have to invert the meaning here.
override fun partiesFromName(query: String) = rpc.partiesFromName(query, !fuzzyIdentityMatch)
override fun nodeInfoFromParty(party: AbstractParty): NodeInfo? = rpc.nodeInfoFromParty(party)
}

View File

@ -36,7 +36,7 @@ class InteractiveShellTest {
constructor(party: Party) : this(party.name.toString())
constructor(b: Int?, amount: Amount<UserValue>) : this("${(b ?: 0) + amount.quantity} ${amount.token}")
constructor(b: Array<String>) : this(b.joinToString("+"))
constructor(amounts: Array<Amount<UserValue>>) : this(amounts.map(Amount<UserValue>::toString).joinToString("++"))
constructor(amounts: Array<Amount<UserValue>>) : this(amounts.joinToString("++", transform = Amount<UserValue>::toString))
override val progressTracker = ProgressTracker()
override fun call() = a