Minor: auto-format of module: node

This commit is contained in:
Mike Hearn
2017-04-11 12:42:53 +02:00
parent 3a7bcee15b
commit d6af727751
32 changed files with 130 additions and 111 deletions

View File

@ -9,8 +9,8 @@ import net.corda.core.readLines
import net.corda.node.LOGS_DIRECTORY_NAME import net.corda.node.LOGS_DIRECTORY_NAME
import net.corda.node.services.api.RegulatorService import net.corda.node.services.api.RegulatorService
import net.corda.node.services.transactions.SimpleNotaryService import net.corda.node.services.transactions.SimpleNotaryService
import org.assertj.core.api.Assertions.assertThat
import net.corda.nodeapi.ArtemisMessagingComponent import net.corda.nodeapi.ArtemisMessagingComponent
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test import org.junit.Test
import java.nio.file.Paths import java.nio.file.Paths
import java.util.concurrent.Executors import java.util.concurrent.Executors

View File

@ -1,4 +1,5 @@
@file:JvmName("Corda") @file:JvmName("Corda")
package net.corda.node package net.corda.node
import com.jcabi.manifests.Manifests import com.jcabi.manifests.Manifests

View File

@ -1,4 +1,5 @@
@file:JvmName("Driver") @file:JvmName("Driver")
package net.corda.node.driver package net.corda.node.driver
import com.google.common.net.HostAndPort import com.google.common.net.HostAndPort
@ -287,6 +288,7 @@ class ShutdownManager(private val executorService: ExecutorService) {
val registeredShutdowns = ArrayList<ListenableFuture<() -> Unit>>() val registeredShutdowns = ArrayList<ListenableFuture<() -> Unit>>()
var isShutdown = false var isShutdown = false
} }
private val state = ThreadBox(State()) private val state = ThreadBox(State())
fun shutdown() { fun shutdown() {

View File

@ -199,10 +199,12 @@ abstract class AbstractNode(open val configuration: NodeConfiguration,
log.warn("Corda node is running in dev mode.") log.warn("Corda node is running in dev mode.")
configuration.configureWithDevSSLCertificate() configuration.configureWithDevSSLCertificate()
} }
require(hasSSLCertificates()) { "Identity certificate not found. " + require(hasSSLCertificates()) {
"Identity certificate not found. " +
"Please either copy your existing identity key and certificate from another node, " + "Please either copy your existing identity key and certificate from another node, " +
"or if you don't have one yet, fill out the config file and run corda.jar --initial-registration. " + "or if you don't have one yet, fill out the config file and run corda.jar --initial-registration. " +
"Read more at: https://docs.corda.net/permissioning.html" } "Read more at: https://docs.corda.net/permissioning.html"
}
log.info("Node starting up ...") log.info("Node starting up ...")

View File

@ -129,6 +129,7 @@ class CordaRPCOpsImpl(
services.storageService.attachments.importAttachment(jar) services.storageService.attachments.importAttachment(jar)
} }
} }
override fun authoriseContractUpgrade(state: StateAndRef<*>, upgradedContractClass: Class<out UpgradedContract<*, *>>) = services.vaultService.authoriseContractUpgrade(state, upgradedContractClass) override fun authoriseContractUpgrade(state: StateAndRef<*>, upgradedContractClass: Class<out UpgradedContract<*, *>>) = services.vaultService.authoriseContractUpgrade(state, upgradedContractClass)
override fun deauthoriseContractUpgrade(state: StateAndRef<*>) = services.vaultService.deauthoriseContractUpgrade(state) override fun deauthoriseContractUpgrade(state: StateAndRef<*>) = services.vaultService.deauthoriseContractUpgrade(state)
override fun currentNodeTime(): Instant = Instant.now(services.clock) override fun currentNodeTime(): Instant = Instant.now(services.clock)

View File

@ -23,10 +23,9 @@ import net.corda.node.services.config.FullNodeConfiguration
import net.corda.node.services.messaging.ArtemisMessagingServer import net.corda.node.services.messaging.ArtemisMessagingServer
import net.corda.node.services.messaging.NodeMessagingClient import net.corda.node.services.messaging.NodeMessagingClient
import net.corda.node.services.transactions.PersistentUniquenessProvider import net.corda.node.services.transactions.PersistentUniquenessProvider
import net.corda.node.services.transactions.RaftNonValidatingNotaryService
import net.corda.node.services.transactions.RaftUniquenessProvider import net.corda.node.services.transactions.RaftUniquenessProvider
import net.corda.node.services.transactions.RaftValidatingNotaryService import net.corda.node.services.transactions.RaftValidatingNotaryService
import net.corda.node.services.transactions.RaftNonValidatingNotaryService
import net.corda.node.services.transactions.*
import net.corda.node.utilities.AddressUtils import net.corda.node.utilities.AddressUtils
import net.corda.node.utilities.AffinityExecutor import net.corda.node.utilities.AffinityExecutor
import net.corda.nodeapi.ArtemisMessagingComponent.NetworkMapAddress import net.corda.nodeapi.ArtemisMessagingComponent.NetworkMapAddress

View File

@ -9,7 +9,10 @@ import io.requery.sql.*
import io.requery.sql.platform.H2 import io.requery.sql.platform.H2
import io.requery.util.function.Function import io.requery.util.function.Function
import io.requery.util.function.Supplier import io.requery.util.function.Supplier
import net.corda.core.schemas.requery.converters.* import net.corda.core.schemas.requery.converters.InstantConverter
import net.corda.core.schemas.requery.converters.SecureHashConverter
import net.corda.core.schemas.requery.converters.StateRefConverter
import net.corda.core.schemas.requery.converters.VaultStateStatusConverter
import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.transactions.TransactionManager
import java.sql.Connection import java.sql.Connection
import java.util.* import java.util.*
@ -128,8 +131,7 @@ class KotlinConfigurationTransactionWrapper(private val model: EntityModel,
override fun getConnection(): Connection { override fun getConnection(): Connection {
val tx = TransactionManager.manager.currentOrNull() val tx = TransactionManager.manager.currentOrNull()
return CordaConnection( return CordaConnection(
tx?.connection ?: tx?.connection ?: TransactionManager.manager.newTransaction(Connection.TRANSACTION_REPEATABLE_READ).connection
TransactionManager.manager.newTransaction(Connection.TRANSACTION_REPEATABLE_READ).connection
) )
} }
} }

View File

@ -4,7 +4,9 @@ import com.zaxxer.hikari.HikariConfig
import com.zaxxer.hikari.HikariDataSource import com.zaxxer.hikari.HikariDataSource
import io.requery.Persistable import io.requery.Persistable
import io.requery.meta.EntityModel import io.requery.meta.EntityModel
import io.requery.sql.* import io.requery.sql.KotlinEntityDataStore
import io.requery.sql.SchemaModifier
import io.requery.sql.TableCreationMode
import net.corda.core.utilities.loggerFor import net.corda.core.utilities.loggerFor
import org.jetbrains.exposed.sql.transactions.TransactionManager import org.jetbrains.exposed.sql.transactions.TransactionManager
import java.sql.Connection import java.sql.Connection

View File

@ -104,6 +104,7 @@ class NodeMessagingClient(override val config: NodeConfiguration,
var rpcNotificationConsumer: ClientConsumer? = null var rpcNotificationConsumer: ClientConsumer? = null
var verificationResponseConsumer: ClientConsumer? = null var verificationResponseConsumer: ClientConsumer? = null
} }
val verifierService = when (config.verifierType) { val verifierService = when (config.verifierType) {
VerifierType.InMemory -> InMemoryTransactionVerifierService(numberOfWorkers = 4) VerifierType.InMemory -> InMemoryTransactionVerifierService(numberOfWorkers = 4)
VerifierType.OutOfProcess -> createOutOfProcessVerifierService() VerifierType.OutOfProcess -> createOutOfProcessVerifierService()
@ -421,8 +422,10 @@ class NodeMessagingClient(override val config: NodeConfiguration,
putLongProperty(HDR_SCHEDULED_DELIVERY_TIME, System.currentTimeMillis() + amqDelay) putLongProperty(HDR_SCHEDULED_DELIVERY_TIME, System.currentTimeMillis() + amqDelay)
} }
} }
log.trace { "Send to: $mqAddress topic: ${message.topicSession.topic} " + log.trace {
"sessionID: ${message.topicSession.sessionID} uuid: ${message.uniqueMessageId}" } "Send to: $mqAddress topic: ${message.topicSession.topic} " +
"sessionID: ${message.topicSession.sessionID} uuid: ${message.uniqueMessageId}"
}
producer!!.send(mqAddress, artemisMessage) producer!!.send(mqAddress, artemisMessage)
} }
} }

View File

@ -70,7 +70,9 @@ abstract class RPCDispatcher(val ops: RPCOps, val userService: RPCUserService, v
// representing what happened, which is useful for us to send over the wire. // representing what happened, which is useful for us to send over the wire.
val subscription = obj.materialize().subscribe { materialised: Notification<out Any> -> val subscription = obj.materialize().subscribe { materialised: Notification<out Any> ->
val newKryo = createRPCKryoForSerialization(qName, dispatcher) val newKryo = createRPCKryoForSerialization(qName, dispatcher)
val bits = try { MarshalledObservation(handle, materialised).serialize(newKryo) } finally { val bits = try {
MarshalledObservation(handle, materialised).serialize(newKryo)
} finally {
releaseRPCKryoForSerialization(newKryo) releaseRPCKryoForSerialization(newKryo)
} }
rpcLog.debug("RPC sending observation: $materialised") rpcLog.debug("RPC sending observation: $materialised")
@ -91,7 +93,9 @@ abstract class RPCDispatcher(val ops: RPCOps, val userService: RPCUserService, v
throw RPCException("Received RPC without any destination for observations, but the RPC returns observables") throw RPCException("Received RPC without any destination for observations, but the RPC returns observables")
val kryo = createRPCKryoForSerialization(observationsTo, this) val kryo = createRPCKryoForSerialization(observationsTo, this)
val args = try { argsBytes.deserialize(kryo) } finally { val args = try {
argsBytes.deserialize(kryo)
} finally {
releaseRPCKryoForSerialization(kryo) releaseRPCKryoForSerialization(kryo)
} }
@ -173,6 +177,7 @@ abstract class RPCDispatcher(val ops: RPCOps, val userService: RPCUserService, v
// TODO remove this User once webserver doesn't need it // TODO remove this User once webserver doesn't need it
private val nodeUser = User(NODE_USER, NODE_USER, setOf()) private val nodeUser = User(NODE_USER, NODE_USER, setOf())
@VisibleForTesting @VisibleForTesting
protected open fun getUser(message: ClientMessage): User { protected open fun getUser(message: ClientMessage): User {
val validatedUser = message.requiredString(Message.HDR_VALIDATED_USER.toString()) val validatedUser = message.requiredString(Message.HDR_VALIDATED_USER.toString())

View File

@ -10,8 +10,7 @@ class FlowSession(
val flow: FlowLogic<*>, val flow: FlowLogic<*>,
val ourSessionId: Long, val ourSessionId: Long,
val initiatingParty: Party?, val initiatingParty: Party?,
var state: FlowSessionState) var state: FlowSessionState) {
{
val receivedMessages = ConcurrentLinkedQueue<ReceivedSessionMessage<*>>() val receivedMessages = ConcurrentLinkedQueue<ReceivedSessionMessage<*>>()
val fiber: FlowStateMachineImpl<*> get() = flow.stateMachine as FlowStateMachineImpl<*> val fiber: FlowStateMachineImpl<*> get() = flow.stateMachine as FlowStateMachineImpl<*>

View File

@ -26,6 +26,7 @@ interface SessionInitResponse : ExistingSessionMessage {
val initiatorSessionId: Long val initiatorSessionId: Long
override val recipientSessionId: Long get() = initiatorSessionId override val recipientSessionId: Long get() = initiatorSessionId
} }
data class SessionConfirm(override val initiatorSessionId: Long, val initiatedSessionId: Long) : SessionInitResponse data class SessionConfirm(override val initiatorSessionId: Long, val initiatedSessionId: Long) : SessionInitResponse
data class SessionReject(override val initiatorSessionId: Long, val errorMessage: String) : SessionInitResponse data class SessionReject(override val initiatorSessionId: Long, val errorMessage: String) : SessionInitResponse

View File

@ -5,7 +5,6 @@ import co.paralleluniverse.fibers.FiberExecutorScheduler
import co.paralleluniverse.io.serialization.kryo.KryoSerializer import co.paralleluniverse.io.serialization.kryo.KryoSerializer
import co.paralleluniverse.strands.Strand import co.paralleluniverse.strands.Strand
import com.codahale.metrics.Gauge import com.codahale.metrics.Gauge
import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.pool.KryoPool import com.esotericsoftware.kryo.pool.KryoPool
import com.google.common.collect.HashMultimap import com.google.common.collect.HashMultimap
import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.ListenableFuture
@ -79,6 +78,7 @@ class StateMachineManager(val serviceHub: ServiceHubInternal,
companion object { companion object {
private val logger = loggerFor<StateMachineManager>() private val logger = loggerFor<StateMachineManager>()
internal val sessionTopic = TopicSession("platform.session") internal val sessionTopic = TopicSession("platform.session")
init { init {
Fiber.setDefaultUncaughtExceptionHandler { fiber, throwable -> Fiber.setDefaultUncaughtExceptionHandler { fiber, throwable ->
(fiber as FlowStateMachineImpl<*>).logger.error("Caught exception from flow", throwable) (fiber as FlowStateMachineImpl<*>).logger.error("Caught exception from flow", throwable)
@ -107,6 +107,7 @@ class StateMachineManager(val serviceHub: ServiceHubInternal,
changesPublisher.bufferUntilDatabaseCommit().onNext(Change(fiber.logic, addOrRemove, fiber.id)) changesPublisher.bufferUntilDatabaseCommit().onNext(Change(fiber.logic, addOrRemove, fiber.id))
} }
} }
private val mutex = ThreadBox(InnerState()) private val mutex = ThreadBox(InnerState())
// True if we're shutting down, so don't resume anything. // True if we're shutting down, so don't resume anything.

View File

@ -9,7 +9,6 @@ import net.corda.core.node.services.TransactionVerifierService
import net.corda.core.random63BitValue import net.corda.core.random63BitValue
import net.corda.core.serialization.SingletonSerializeAsToken import net.corda.core.serialization.SingletonSerializeAsToken
import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.LedgerTransaction
import net.corda.core.utilities.debug
import net.corda.core.utilities.loggerFor import net.corda.core.utilities.loggerFor
import net.corda.node.services.api.MonitoringService import net.corda.node.services.api.MonitoringService
import net.corda.nodeapi.VerifierApi import net.corda.nodeapi.VerifierApi
@ -22,15 +21,18 @@ abstract class OutOfProcessTransactionVerifierService(
companion object { companion object {
val log = loggerFor<OutOfProcessTransactionVerifierService>() val log = loggerFor<OutOfProcessTransactionVerifierService>()
} }
private data class VerificationHandle( private data class VerificationHandle(
val transactionId: SecureHash, val transactionId: SecureHash,
val resultFuture: SettableFuture<Unit>, val resultFuture: SettableFuture<Unit>,
val durationTimerContext: Timer.Context val durationTimerContext: Timer.Context
) )
private val verificationHandles = ConcurrentHashMap<Long, VerificationHandle>() private val verificationHandles = ConcurrentHashMap<Long, VerificationHandle>()
// Metrics // Metrics
private fun metric(name: String) = "OutOfProcessTransactionVerifierService.$name" private fun metric(name: String) = "OutOfProcessTransactionVerifierService.$name"
private val durationTimer = monitoringService.metrics.timer(metric("Verification.Duration")) private val durationTimer = monitoringService.metrics.timer(metric("Verification.Duration"))
private val successMeter = monitoringService.metrics.meter(metric("Verification.Success")) private val successMeter = monitoringService.metrics.meter(metric("Verification.Success"))
private val failureMeter = monitoringService.metrics.meter(metric("Verification.Failure")) private val failureMeter = monitoringService.metrics.meter(metric("Verification.Failure"))

View File

@ -13,7 +13,10 @@ import net.corda.contracts.asset.Cash
import net.corda.core.ThreadBox import net.corda.core.ThreadBox
import net.corda.core.bufferUntilSubscribed import net.corda.core.bufferUntilSubscribed
import net.corda.core.contracts.* import net.corda.core.contracts.*
import net.corda.core.crypto.* import net.corda.core.crypto.AbstractParty
import net.corda.core.crypto.CompositeKey
import net.corda.core.crypto.Party
import net.corda.core.crypto.SecureHash
import net.corda.core.node.ServiceHub import net.corda.core.node.ServiceHub
import net.corda.core.node.services.StatesNotAvailableException import net.corda.core.node.services.StatesNotAvailableException
import net.corda.core.node.services.Vault import net.corda.core.node.services.Vault
@ -292,8 +295,7 @@ class NodeVaultService(private val services: ServiceHub, dataSourceProperties: P
log.trace("Releasing ${update.value()} soft locked states for $lockId") log.trace("Releasing ${update.value()} soft locked states for $lockId")
} }
} }
} } else if (stateRefs.isNotEmpty()) {
else if (stateRefs.isNotEmpty()) {
try { try {
session.withTransaction(TransactionIsolation.REPEATABLE_READ) { session.withTransaction(TransactionIsolation.REPEATABLE_READ) {
val updatedRows = update(VaultStatesEntity::class) val updatedRows = update(VaultStatesEntity::class)

View File

@ -1,4 +1,5 @@
package net.corda.node.services.vault package net.corda.node.services.vault
import net.corda.core.contracts.StateRef import net.corda.core.contracts.StateRef
import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowLogic
import net.corda.core.flows.StateMachineRunId import net.corda.core.flows.StateMachineRunId

View File

@ -1,11 +1,13 @@
package net.corda.node.utilities package net.corda.node.utilities
import com.google.common.util.concurrent.ListeningScheduledExecutorService
import com.google.common.util.concurrent.SettableFuture import com.google.common.util.concurrent.SettableFuture
import com.google.common.util.concurrent.Uninterruptibles import com.google.common.util.concurrent.Uninterruptibles
import net.corda.core.utilities.loggerFor import net.corda.core.utilities.loggerFor
import java.util.* import java.util.*
import java.util.concurrent.* import java.util.concurrent.CompletableFuture
import java.util.concurrent.Executor
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ScheduledThreadPoolExecutor
import java.util.function.Supplier import java.util.function.Supplier
/** /**

View File

@ -261,6 +261,7 @@ fun <T : Any> rx.Observable<T>.wrapWithDatabaseTransaction(db: Database? = null)
// Composite columns for use with below Exposed helpers. // Composite columns for use with below Exposed helpers.
data class PartyColumns(val name: Column<String>, val owningKey: Column<CompositeKey>) data class PartyColumns(val name: Column<String>, val owningKey: Column<CompositeKey>)
data class StateRefColumns(val txId: Column<SecureHash>, val index: Column<Int>) data class StateRefColumns(val txId: Column<SecureHash>, val index: Column<Int>)
data class TxnNoteColumns(val txId: Column<SecureHash>, val note: Column<String>) data class TxnNoteColumns(val txId: Column<SecureHash>, val note: Column<String>)

View File

@ -28,6 +28,7 @@ class InteractiveShellTest {
constructor(amount: Amount<Currency>) : this(amount.toString()) constructor(amount: Amount<Currency>) : this(amount.toString())
constructor(pair: Pair<Amount<Currency>, SecureHash.SHA256>) : this(pair.toString()) constructor(pair: Pair<Amount<Currency>, SecureHash.SHA256>) : this(pair.toString())
constructor(party: Party) : this(party.name) constructor(party: Party) : this(party.name)
override fun call() = a override fun call() = a
} }

View File

@ -14,8 +14,8 @@ import net.corda.node.services.network.NetworkMapService
import net.corda.node.services.persistence.NodeAttachmentService import net.corda.node.services.persistence.NodeAttachmentService
import net.corda.node.services.persistence.schemas.AttachmentEntity import net.corda.node.services.persistence.schemas.AttachmentEntity
import net.corda.node.services.transactions.SimpleNotaryService import net.corda.node.services.transactions.SimpleNotaryService
import net.corda.testing.node.MockNetwork
import net.corda.node.utilities.databaseTransaction import net.corda.node.utilities.databaseTransaction
import net.corda.testing.node.MockNetwork
import net.corda.testing.node.makeTestDataSourceProperties import net.corda.testing.node.makeTestDataSourceProperties
import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.Database
import org.junit.Before import org.junit.Before

View File

@ -256,6 +256,7 @@ abstract class AbstractNetworkMapServiceTest<out S : AbstractNetworkMapService>
data class Added(val node: NodeInfo) : Changed() { data class Added(val node: NodeInfo) : Changed() {
constructor(node: MockNode) : this(node.info) constructor(node: MockNode) : this(node.info)
} }
data class Removed(val node: NodeInfo) : Changed() { data class Removed(val node: NodeInfo) : Changed() {
constructor(node: MockNode) : this(node.info) constructor(node: MockNode) : this(node.info)
} }

View File

@ -4,7 +4,10 @@ import net.corda.core.crypto.Party
import net.corda.core.crypto.composite import net.corda.core.crypto.composite
import net.corda.core.crypto.generateKeyPair import net.corda.core.crypto.generateKeyPair
import net.corda.node.services.identity.InMemoryIdentityService import net.corda.node.services.identity.InMemoryIdentityService
import net.corda.testing.* import net.corda.testing.ALICE
import net.corda.testing.ALICE_PUBKEY
import net.corda.testing.BOB
import net.corda.testing.BOB_PUBKEY
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertNull import kotlin.test.assertNull

View File

@ -8,7 +8,6 @@ import net.corda.core.node.services.ServiceInfo
import net.corda.core.seconds import net.corda.core.seconds
import net.corda.core.transactions.WireTransaction import net.corda.core.transactions.WireTransaction
import net.corda.core.utilities.DUMMY_NOTARY import net.corda.core.utilities.DUMMY_NOTARY
import net.corda.core.utilities.DUMMY_NOTARY_KEY
import net.corda.flows.NotaryChangeFlow.Instigator import net.corda.flows.NotaryChangeFlow.Instigator
import net.corda.flows.StateReplacementException import net.corda.flows.StateReplacementException
import net.corda.node.internal.AbstractNode import net.corda.node.internal.AbstractNode

View File

@ -11,14 +11,12 @@ import net.corda.core.node.services.ServiceInfo
import net.corda.core.seconds import net.corda.core.seconds
import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.SignedTransaction
import net.corda.core.utilities.DUMMY_NOTARY import net.corda.core.utilities.DUMMY_NOTARY
import net.corda.core.utilities.DUMMY_NOTARY_KEY
import net.corda.flows.NotaryError import net.corda.flows.NotaryError
import net.corda.flows.NotaryException import net.corda.flows.NotaryException
import net.corda.flows.NotaryFlow import net.corda.flows.NotaryFlow
import net.corda.node.internal.AbstractNode import net.corda.node.internal.AbstractNode
import net.corda.node.services.network.NetworkMapService import net.corda.node.services.network.NetworkMapService
import net.corda.node.services.transactions.SimpleNotaryService import net.corda.node.services.transactions.SimpleNotaryService
import net.corda.testing.MINI_CORP_KEY
import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetwork
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.Before import org.junit.Before

View File

@ -8,7 +8,6 @@ import net.corda.core.getOrThrow
import net.corda.core.node.services.ServiceInfo import net.corda.core.node.services.ServiceInfo
import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.SignedTransaction
import net.corda.core.utilities.DUMMY_NOTARY import net.corda.core.utilities.DUMMY_NOTARY
import net.corda.core.utilities.DUMMY_NOTARY_KEY
import net.corda.flows.NotaryError import net.corda.flows.NotaryError
import net.corda.flows.NotaryException import net.corda.flows.NotaryException
import net.corda.flows.NotaryFlow import net.corda.flows.NotaryFlow
@ -16,7 +15,6 @@ import net.corda.node.internal.AbstractNode
import net.corda.node.services.network.NetworkMapService import net.corda.node.services.network.NetworkMapService
import net.corda.node.services.transactions.ValidatingNotaryService import net.corda.node.services.transactions.ValidatingNotaryService
import net.corda.testing.MEGA_CORP_KEY import net.corda.testing.MEGA_CORP_KEY
import net.corda.testing.MINI_CORP_KEY
import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetwork
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.Before import org.junit.Before

View File

@ -14,9 +14,6 @@ import net.corda.core.transactions.SignedTransaction
import net.corda.core.utilities.DUMMY_NOTARY import net.corda.core.utilities.DUMMY_NOTARY
import net.corda.core.utilities.DUMMY_NOTARY_KEY import net.corda.core.utilities.DUMMY_NOTARY_KEY
import net.corda.core.utilities.LogHelper import net.corda.core.utilities.LogHelper
import net.corda.node.services.schema.HibernateObserver
import net.corda.node.services.schema.NodeSchemaService
import net.corda.node.services.vault.NodeVaultService
import net.corda.node.utilities.configureDatabase import net.corda.node.utilities.configureDatabase
import net.corda.node.utilities.databaseTransaction import net.corda.node.utilities.databaseTransaction
import net.corda.testing.BOB_KEY import net.corda.testing.BOB_KEY
@ -173,8 +170,7 @@ class VaultWithCashTest {
LOCKED: ${vault.softLockedStates<Cash.State>().count()} : ${vault.softLockedStates<Cash.State>()} LOCKED: ${vault.softLockedStates<Cash.State>().count()} : ${vault.softLockedStates<Cash.State>()}
""") """)
txn1 txn1
} } catch(e: Exception) {
catch(e: Exception) {
println(e) println(e)
} }
} }
@ -206,8 +202,7 @@ class VaultWithCashTest {
LOCKED: ${vault.softLockedStates<Cash.State>().count()} : ${vault.softLockedStates<Cash.State>()} LOCKED: ${vault.softLockedStates<Cash.State>().count()} : ${vault.softLockedStates<Cash.State>()}
""") """)
txn2 txn2
} } catch(e: Exception) {
catch(e: Exception) {
println(e) println(e)
} }
} }

View File

@ -15,7 +15,6 @@ import net.corda.core.utilities.LogHelper
import net.corda.node.services.RPCUserService import net.corda.node.services.RPCUserService
import net.corda.node.services.RPCUserServiceImpl import net.corda.node.services.RPCUserServiceImpl
import net.corda.node.services.api.MonitoringService import net.corda.node.services.api.MonitoringService
import net.corda.node.services.config.FullNodeConfiguration
import net.corda.node.services.config.NodeConfiguration import net.corda.node.services.config.NodeConfiguration
import net.corda.node.services.config.configureWithDevSSLCertificate import net.corda.node.services.config.configureWithDevSSLCertificate
import net.corda.node.services.network.InMemoryNetworkMapCache import net.corda.node.services.network.InMemoryNetworkMapCache

View File

@ -5,7 +5,6 @@ import org.junit.Test
import java.util.* import java.util.*
import java.util.concurrent.CountDownLatch import java.util.concurrent.CountDownLatch
import java.util.concurrent.atomic.AtomicReference import java.util.concurrent.atomic.AtomicReference
import kotlin.concurrent.thread
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertFails import kotlin.test.assertFails
import kotlin.test.assertNotEquals import kotlin.test.assertNotEquals