mirror of
https://github.com/corda/corda.git
synced 2025-06-06 01:11:45 +00:00
experimental: Fix compile errors
This commit is contained in:
parent
9f6415efab
commit
836933d223
@ -4,7 +4,6 @@ import com.r3corda.core.contracts.*
|
|||||||
import com.r3corda.core.crypto.Party
|
import com.r3corda.core.crypto.Party
|
||||||
import com.r3corda.core.crypto.SecureHash
|
import com.r3corda.core.crypto.SecureHash
|
||||||
import com.r3corda.core.transactions.TransactionBuilder
|
import com.r3corda.core.transactions.TransactionBuilder
|
||||||
import com.sun.tools.corba.se.idl.InvalidArgument
|
|
||||||
import java.math.BigDecimal
|
import java.math.BigDecimal
|
||||||
import java.security.PublicKey
|
import java.security.PublicKey
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
@ -174,7 +173,7 @@ class UniversalContract : Contract {
|
|||||||
val arr = when (inState.details) {
|
val arr = when (inState.details) {
|
||||||
is Actions -> inState.details
|
is Actions -> inState.details
|
||||||
is RollOut -> reduceRollOut(inState.details)
|
is RollOut -> reduceRollOut(inState.details)
|
||||||
else -> throw InvalidArgument("Unexpected arrangement, " + tx.inputs.single())
|
else -> throw IllegalArgumentException("Unexpected arrangement, " + tx.inputs.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
val actions = actions(arr)
|
val actions = actions(arr)
|
||||||
@ -238,7 +237,7 @@ class UniversalContract : Contract {
|
|||||||
val arr = when (inState.details) {
|
val arr = when (inState.details) {
|
||||||
is Actions -> inState.details
|
is Actions -> inState.details
|
||||||
is RollOut -> reduceRollOut(inState.details)
|
is RollOut -> reduceRollOut(inState.details)
|
||||||
else -> throw InvalidArgument("Unexpected arrangement, " + tx.inputs.single())
|
else -> throw IllegalArgumentException("Unexpected arrangement, " + tx.inputs.single())
|
||||||
}
|
}
|
||||||
val outState = tx.outputs.single() as State
|
val outState = tx.outputs.single() as State
|
||||||
|
|
||||||
|
@ -5,10 +5,7 @@ import com.google.common.collect.Sets
|
|||||||
import com.r3corda.core.contracts.Amount
|
import com.r3corda.core.contracts.Amount
|
||||||
import com.r3corda.core.contracts.Frequency
|
import com.r3corda.core.contracts.Frequency
|
||||||
import com.r3corda.core.crypto.Party
|
import com.r3corda.core.crypto.Party
|
||||||
import com.sun.javaws.exceptions.InvalidArgumentException
|
|
||||||
import com.sun.org.apache.xpath.internal.operations.Bool
|
import com.sun.org.apache.xpath.internal.operations.Bool
|
||||||
import com.sun.tools.corba.se.idl.InvalidArgument
|
|
||||||
import com.sun.tools.javadoc.Start
|
|
||||||
import java.math.BigDecimal
|
import java.math.BigDecimal
|
||||||
import java.security.PublicKey
|
import java.security.PublicKey
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
@ -96,7 +93,10 @@ fun actions(arrangement: Arrangement): Map<String, Action> = when (arrangement)
|
|||||||
is Transfer -> mapOf()
|
is Transfer -> mapOf()
|
||||||
is Actions -> arrangement.actions.map { it.name to it }.toMap()
|
is Actions -> arrangement.actions.map { it.name to it }.toMap()
|
||||||
is And -> arrangement.arrangements.map { actions(it) }.fold(mutableMapOf()) { m, x ->
|
is And -> arrangement.arrangements.map { actions(it) }.fold(mutableMapOf()) { m, x ->
|
||||||
x.forEach { s, action -> m[s] = action }
|
x.forEach { entry ->
|
||||||
|
val (s, action) = entry
|
||||||
|
m[s] = action
|
||||||
|
}
|
||||||
m
|
m
|
||||||
}
|
}
|
||||||
is RollOut -> mapOf()
|
is RollOut -> mapOf()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user