mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
Move kotlin utility helper out of public into internals. (#2979)
This commit is contained in:
parent
ec70478d70
commit
ca55c80bfc
@ -464,3 +464,8 @@ fun NotarisationRequest.generateSignature(serviceHub: ServiceHub): NotarisationR
|
||||
}
|
||||
|
||||
val PublicKey.hash: SecureHash get() = encoded.sha256()
|
||||
|
||||
/**
|
||||
* Extension method for providing a sumBy method that processes and returns a Long
|
||||
*/
|
||||
fun <T> Iterable<T>.sumByLong(selector: (T) -> Long): Long = this.map { selector(it) }.sum()
|
||||
|
@ -130,7 +130,3 @@ fun <V> Future<V>.getOrThrow(timeout: Duration? = null): V = try {
|
||||
throw e.cause!!
|
||||
}
|
||||
|
||||
/**
|
||||
* Extension method for providing a sumBy method that processes and returns a Long
|
||||
*/
|
||||
fun <T> Iterable<T>.sumByLong(selector: (T) -> Long): Long = this.map { selector(it) }.sum()
|
||||
|
@ -4,7 +4,7 @@ import net.corda.behave.scenarios.ScenarioState
|
||||
import net.corda.behave.scenarios.api.StepsBlock
|
||||
import net.corda.behave.scenarios.helpers.Vault
|
||||
import net.corda.core.contracts.ContractState
|
||||
import net.corda.core.utilities.sumByLong
|
||||
import net.corda.core.internal.sumByLong
|
||||
import net.corda.finance.contracts.asset.Cash
|
||||
|
||||
class VaultSteps : StepsBlock {
|
||||
|
Loading…
Reference in New Issue
Block a user