mirror of
https://github.com/corda/corda.git
synced 2025-03-19 18:45:28 +00:00
Merge pull request #1536 from corda/feature/vkolomeyko/OS-Ent-merge
OS->Ent merge
This commit is contained in:
commit
ffa1adb5d4
@ -24,7 +24,12 @@ class ConfigHolder(services: AppServiceHub) : SingletonSerializeAsToken() {
|
||||
val issuableCurrencies: List<Currency>
|
||||
|
||||
init {
|
||||
val issuableCurrenciesStringList: List<String> = uncheckedCast(services.getAppContext().config.get("issuableCurrencies"))
|
||||
val config = services.getAppContext().config
|
||||
val issuableCurrenciesStringList: List<String> = if (config.exists("issuableCurrencies")) {
|
||||
uncheckedCast(config.get("issuableCurrencies"))
|
||||
} else {
|
||||
emptyList()
|
||||
}
|
||||
issuableCurrencies = issuableCurrenciesStringList.map(Currency::getInstance)
|
||||
(issuableCurrencies - supportedCurrencies).let {
|
||||
require(it.isEmpty()) { "$it are not supported currencies" }
|
||||
|
@ -48,11 +48,12 @@ class PersistentUniquenessProviderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should commit a transaction with unused inputs without exception`() {
|
||||
fun `should successfully commit a transaction with unused inputs`() {
|
||||
val provider = PersistentUniquenessProvider(Clock.systemUTC(), database, TestingNamedCacheFactory())
|
||||
val inputState = generateStateRef()
|
||||
|
||||
provider.commit(listOf(inputState), txID, identity, requestSignature).get()
|
||||
val result = provider.commit(listOf(inputState), txID, identity, requestSignature).get()
|
||||
assertEquals(UniquenessProvider.Result.Success, result)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -62,7 +63,8 @@ class PersistentUniquenessProviderTests {
|
||||
|
||||
val inputs = listOf(inputState)
|
||||
val firstTxId = txID
|
||||
provider.commit(inputs, firstTxId, identity, requestSignature).get()
|
||||
val result = provider.commit(inputs, firstTxId, identity, requestSignature).get()
|
||||
assertEquals(UniquenessProvider.Result.Success, result)
|
||||
|
||||
val secondTxId = SecureHash.randomSHA256()
|
||||
|
||||
|
@ -638,7 +638,12 @@ class DriverDSLImpl(
|
||||
emptyList()
|
||||
}
|
||||
|
||||
val cordappDirectories = existingCorDappDirectoriesOption + (cordappsForAllNodes + additionalCordapps).map { TestCordappDirectories.getJarDirectory(it).toString() }
|
||||
// Instead of using cordappsForAllNodes we get only these that are missing from additionalCordapps
|
||||
// This way we prevent errors when we want the same CordApp but with different config
|
||||
val appOverrides = additionalCordapps.map { it.name to it.version}.toSet()
|
||||
val baseCordapps = cordappsForAllNodes.filter { !appOverrides.contains(it.name to it.version) }
|
||||
|
||||
val cordappDirectories = existingCorDappDirectoriesOption + (baseCordapps + additionalCordapps).map { TestCordappDirectories.getJarDirectory(it).toString() }
|
||||
|
||||
val config = NodeConfig(specifiedConfig.typesafe.withValue(NodeConfiguration.cordappDirectoriesKey, ConfigValueFactory.fromIterable(cordappDirectories.toSet())))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user