mirror of
https://github.com/corda/corda.git
synced 2025-06-22 17:09:00 +00:00
ENT-10122: Updated tests to include consuming transaction id in the Vault.Update check.
This commit is contained in:
@ -119,7 +119,7 @@ class Vault<out T : ContractState>(val states: Iterable<StateAndRef<T>>) {
|
||||
val combinedProduced = produced.filter { it !in rhs.consumed }.toSet() + rhs.produced
|
||||
return copy(consumed = combinedConsumed, produced = combinedProduced, references = references + rhs.references, consumingTxIds = consumingTxIds + rhs.consumingTxIds)
|
||||
}
|
||||
|
||||
//val consumingTxIds: Map<StateRef, SecureHash> = emptyMap()
|
||||
override fun toString(): String {
|
||||
val sb = StringBuilder()
|
||||
sb.appendln("${consumed.size} consumed, ${produced.size} produced")
|
||||
@ -137,6 +137,10 @@ class Vault<out T : ContractState>(val states: Iterable<StateAndRef<T>>) {
|
||||
references.forEach {
|
||||
sb.appendln("${it.ref}: ${it.state}")
|
||||
}
|
||||
sb.appendln("Consuming TxIds:")
|
||||
consumingTxIds.forEach {
|
||||
sb.appendln("${it.key}: ${it.value}")
|
||||
}
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user