diff --git a/src/main/kotlin/api/APIServerImpl.kt b/src/main/kotlin/api/APIServerImpl.kt index ab652a48b6..ebda1cd4ab 100644 --- a/src/main/kotlin/api/APIServerImpl.kt +++ b/src/main/kotlin/api/APIServerImpl.kt @@ -9,7 +9,7 @@ import core.WireTransaction import core.crypto.DigitalSignature import core.crypto.SecureHash import core.node.AbstractNode -import core.node.services.linearHeadsOfType +import core.node.subsystems.linearHeadsOfType import core.protocols.ProtocolLogic import core.serialization.SerializedBytes import core.utilities.ANSIProgressRenderer diff --git a/src/main/kotlin/api/Config.kt b/src/main/kotlin/api/Config.kt index 1917a0eebd..ef6476af14 100644 --- a/src/main/kotlin/api/Config.kt +++ b/src/main/kotlin/api/Config.kt @@ -1,7 +1,7 @@ package api import com.fasterxml.jackson.databind.ObjectMapper -import core.node.services.ServiceHub +import core.node.ServiceHub import core.utilities.JsonSupport import javax.ws.rs.ext.ContextResolver import javax.ws.rs.ext.Provider diff --git a/src/main/kotlin/core/messaging/StateMachineManager.kt b/src/main/kotlin/core/messaging/StateMachineManager.kt index 7afe593976..4287e43558 100644 --- a/src/main/kotlin/core/messaging/StateMachineManager.kt +++ b/src/main/kotlin/core/messaging/StateMachineManager.kt @@ -9,7 +9,7 @@ import com.google.common.base.Throwables import com.google.common.util.concurrent.ListenableFuture import core.crypto.SecureHash import core.crypto.sha256 -import core.node.services.ServiceHub +import core.node.ServiceHub import core.protocols.ProtocolLogic import core.protocols.ProtocolStateMachine import core.serialization.THREAD_LOCAL_KRYO diff --git a/src/main/kotlin/core/node/AbstractNode.kt b/src/main/kotlin/core/node/AbstractNode.kt index 684e858727..665e96c92c 100644 --- a/src/main/kotlin/core/node/AbstractNode.kt +++ b/src/main/kotlin/core/node/AbstractNode.kt @@ -11,6 +11,7 @@ import core.crypto.generateKeyPair import core.messaging.MessagingService import core.messaging.StateMachineManager import core.messaging.runOnNextMessage +import core.node.subsystems.* import core.node.services.* import core.random63BitValue import core.serialization.deserialize diff --git a/src/main/kotlin/core/node/Node.kt b/src/main/kotlin/core/node/Node.kt index 3a6f4c9bb4..35780542a9 100644 --- a/src/main/kotlin/core/node/Node.kt +++ b/src/main/kotlin/core/node/Node.kt @@ -6,7 +6,7 @@ import api.ResponseFilter import com.codahale.metrics.JmxReporter import com.google.common.net.HostAndPort import core.messaging.MessagingService -import core.node.services.ArtemisMessagingService +import core.node.subsystems.ArtemisMessagingService import core.node.services.ServiceType import core.node.servlets.AttachmentDownloadServlet import core.node.servlets.DataUploadServlet diff --git a/src/main/kotlin/core/node/ServiceHub.kt b/src/main/kotlin/core/node/ServiceHub.kt new file mode 100644 index 0000000000..d6c4436954 --- /dev/null +++ b/src/main/kotlin/core/node/ServiceHub.kt @@ -0,0 +1,58 @@ +package core.node + +import core.* +import core.crypto.SecureHash +import core.messaging.MessagingService +import core.node.subsystems.* +import core.node.services.* +import core.utilities.RecordingMap +import java.time.Clock + +/** + * A service hub simply vends references to the other services a node has. Some of those services may be missing or + * mocked out. This class is useful to pass to chunks of pluggable code that might have need of many different kinds of + * functionality and you don't want to hard-code which types in the interface. + */ +interface ServiceHub { + val walletService: WalletService + val keyManagementService: KeyManagementService + val identityService: IdentityService + val storageService: StorageService + val networkService: MessagingService + val networkMapCache: NetworkMapCache + val monitoringService: MonitoringService + val clock: Clock + + /** + * Given a [LedgerTransaction], looks up all its dependencies in the local database, uses the identity service to map + * the [SignedTransaction]s the DB gives back into [LedgerTransaction]s, and then runs the smart contracts for the + * transaction. If no exception is thrown, the transaction is valid. + */ + fun verifyTransaction(ltx: LedgerTransaction) { + val dependencies = ltx.inputs.map { + storageService.validatedTransactions[it.txhash] ?: throw TransactionResolutionException(it.txhash) + } + val ltxns = dependencies.map { it.verifyToLedgerTransaction(identityService, storageService.attachments) } + TransactionGroup(setOf(ltx), ltxns.toSet()).verify() + } + + /** + * Given a list of [SignedTransaction]s, writes them to the local storage for validated transactions and then + * sends them to the wallet for further processing. + * + * TODO: Need to come up with a way for preventing transactions being written other than by this method. + * TODO: RecordingMap is test infrastructure. Refactor it away or find a way to ensure it's only used in tests. + * + * @param txs The transactions to record + * @param skipRecordingMap This is used in unit testing and can be ignored most of the time. + */ + fun recordTransactions(txs: List, skipRecordingMap: Boolean = false) { + val txns: Map = txs.groupBy { it.id }.mapValues { it.value.first() } + val txStorage = storageService.validatedTransactions + if (txStorage is RecordingMap && skipRecordingMap) + txStorage.putAllUnrecorded(txns) + else + txStorage.putAll(txns) + walletService.notifyAll(txs.map { it.tx }) + } +} \ No newline at end of file diff --git a/src/main/kotlin/core/node/services/AbstractNodeService.kt b/src/main/kotlin/core/node/services/AbstractNodeService.kt index 1e5b245e35..7101af2282 100644 --- a/src/main/kotlin/core/node/services/AbstractNodeService.kt +++ b/src/main/kotlin/core/node/services/AbstractNodeService.kt @@ -2,6 +2,7 @@ package core.node.services import core.messaging.Message import core.messaging.MessagingService +import core.node.subsystems.TOPIC_DEFAULT_POSTFIX import core.serialization.deserialize import core.serialization.serialize import protocols.AbstractRequestMessage diff --git a/src/main/kotlin/core/node/services/NetworkMapService.kt b/src/main/kotlin/core/node/services/NetworkMapService.kt index 7d6f40cb0a..1c0bf5fa01 100644 --- a/src/main/kotlin/core/node/services/NetworkMapService.kt +++ b/src/main/kotlin/core/node/services/NetworkMapService.kt @@ -11,6 +11,8 @@ import core.messaging.MessageRecipients import core.messaging.MessagingService import core.messaging.SingleMessageRecipient import core.node.NodeInfo +import core.node.subsystems.NetworkMapCache +import core.node.subsystems.TOPIC_DEFAULT_POSTFIX import core.serialization.SerializedBytes import core.serialization.deserialize import core.serialization.serialize diff --git a/src/main/kotlin/core/node/servlets/AttachmentDownloadServlet.kt b/src/main/kotlin/core/node/servlets/AttachmentDownloadServlet.kt index 31bb0487a2..363831ed39 100644 --- a/src/main/kotlin/core/node/servlets/AttachmentDownloadServlet.kt +++ b/src/main/kotlin/core/node/servlets/AttachmentDownloadServlet.kt @@ -1,7 +1,7 @@ package core.node.servlets import core.crypto.SecureHash -import core.node.services.StorageService +import core.node.subsystems.StorageService import core.utilities.loggerFor import java.io.FileNotFoundException import javax.servlet.http.HttpServlet diff --git a/src/main/kotlin/core/node/services/ArtemisMessagingService.kt b/src/main/kotlin/core/node/subsystems/ArtemisMessagingService.kt similarity index 99% rename from src/main/kotlin/core/node/services/ArtemisMessagingService.kt rename to src/main/kotlin/core/node/subsystems/ArtemisMessagingService.kt index 56b3a8b619..81de57bb9b 100644 --- a/src/main/kotlin/core/node/services/ArtemisMessagingService.kt +++ b/src/main/kotlin/core/node/subsystems/ArtemisMessagingService.kt @@ -1,4 +1,4 @@ -package core.node.services +package core.node.subsystems import com.google.common.net.HostAndPort import core.RunOnCallerThread @@ -141,7 +141,7 @@ class ArtemisMessagingService(val directory: Path, val myHostPort: HostAndPort, // This code runs for every inbound message. try { if (!message.containsProperty(TOPIC_PROPERTY)) { - log.warn("Received message without a $TOPIC_PROPERTY property, ignoring") + log.warn("Received message without a ${TOPIC_PROPERTY} property, ignoring") return@setMessageHandler } val topic = message.getStringProperty(TOPIC_PROPERTY) diff --git a/src/main/kotlin/core/node/services/DataVendingService.kt b/src/main/kotlin/core/node/subsystems/DataVendingService.kt similarity index 96% rename from src/main/kotlin/core/node/services/DataVendingService.kt rename to src/main/kotlin/core/node/subsystems/DataVendingService.kt index 26bb4c44fa..728e142e0f 100644 --- a/src/main/kotlin/core/node/services/DataVendingService.kt +++ b/src/main/kotlin/core/node/subsystems/DataVendingService.kt @@ -1,4 +1,4 @@ -package core.node.services +package core.node.subsystems import core.SignedTransaction import core.crypto.SecureHash @@ -6,6 +6,8 @@ import core.messaging.Message import core.messaging.MessagingService import core.messaging.SingleMessageRecipient import core.messaging.send +import core.node.services.AbstractNodeService +import core.node.subsystems.StorageService import core.serialization.deserialize import core.utilities.loggerFor import protocols.AbstractRequestMessage diff --git a/src/main/kotlin/core/node/services/E2ETestKeyManagementService.kt b/src/main/kotlin/core/node/subsystems/E2ETestKeyManagementService.kt similarity index 94% rename from src/main/kotlin/core/node/services/E2ETestKeyManagementService.kt rename to src/main/kotlin/core/node/subsystems/E2ETestKeyManagementService.kt index 05e4ec813f..5af47e5626 100644 --- a/src/main/kotlin/core/node/services/E2ETestKeyManagementService.kt +++ b/src/main/kotlin/core/node/subsystems/E2ETestKeyManagementService.kt @@ -1,7 +1,8 @@ -package core.node.services +package core.node.subsystems import core.ThreadBox import core.crypto.generateKeyPair +import core.node.subsystems.KeyManagementService import java.security.KeyPair import java.security.PrivateKey import java.security.PublicKey diff --git a/src/main/kotlin/core/node/services/InMemoryIdentityService.kt b/src/main/kotlin/core/node/subsystems/InMemoryIdentityService.kt similarity index 91% rename from src/main/kotlin/core/node/services/InMemoryIdentityService.kt rename to src/main/kotlin/core/node/subsystems/InMemoryIdentityService.kt index 271206079d..95748c5526 100644 --- a/src/main/kotlin/core/node/services/InMemoryIdentityService.kt +++ b/src/main/kotlin/core/node/subsystems/InMemoryIdentityService.kt @@ -1,6 +1,7 @@ -package core.node.services +package core.node.subsystems import core.Party +import core.node.services.IdentityService import java.security.PublicKey import java.util.concurrent.ConcurrentHashMap import javax.annotation.concurrent.ThreadSafe diff --git a/src/main/kotlin/core/node/services/NetworkMapCache.kt b/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt similarity index 99% rename from src/main/kotlin/core/node/services/NetworkMapCache.kt rename to src/main/kotlin/core/node/subsystems/NetworkMapCache.kt index b5155cd85e..eb0df17ea5 100644 --- a/src/main/kotlin/core/node/services/NetworkMapCache.kt +++ b/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt @@ -1,4 +1,4 @@ -package core.node.services +package core.node.subsystems import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.MoreExecutors @@ -10,6 +10,7 @@ import core.messaging.MessagingService import core.messaging.StateMachineManager import core.messaging.runOnNextMessage import core.node.NodeInfo +import core.node.services.* import core.random63BitValue import core.serialization.deserialize import core.serialization.serialize diff --git a/src/main/kotlin/core/node/services/NodeWalletService.kt b/src/main/kotlin/core/node/subsystems/NodeWalletService.kt similarity index 98% rename from src/main/kotlin/core/node/services/NodeWalletService.kt rename to src/main/kotlin/core/node/subsystems/NodeWalletService.kt index 86f0749bca..6f8bde6e84 100644 --- a/src/main/kotlin/core/node/services/NodeWalletService.kt +++ b/src/main/kotlin/core/node/subsystems/NodeWalletService.kt @@ -1,9 +1,12 @@ -package core.node.services +package core.node.subsystems import com.codahale.metrics.Gauge import contracts.Cash import core.* import core.crypto.SecureHash +import core.node.ServiceHub +import core.node.subsystems.Wallet +import core.node.subsystems.WalletService import core.utilities.loggerFor import core.utilities.trace import java.security.PublicKey diff --git a/src/main/kotlin/core/node/services/Services.kt b/src/main/kotlin/core/node/subsystems/Services.kt similarity index 73% rename from src/main/kotlin/core/node/services/Services.kt rename to src/main/kotlin/core/node/subsystems/Services.kt index fb57ac24c0..4d65544351 100644 --- a/src/main/kotlin/core/node/services/Services.kt +++ b/src/main/kotlin/core/node/subsystems/Services.kt @@ -1,10 +1,12 @@ -package core.node.services +package core.node.subsystems import com.codahale.metrics.MetricRegistry import contracts.Cash import core.* import core.crypto.SecureHash import core.messaging.MessagingService +import core.node.subsystems.NetworkMapCache +import core.node.services.AttachmentStorage import core.utilities.RecordingMap import java.security.KeyPair import java.security.PrivateKey @@ -147,51 +149,3 @@ interface StorageService { */ class MonitoringService(val metrics: MetricRegistry) -/** - * A service hub simply vends references to the other services a node has. Some of those services may be missing or - * mocked out. This class is useful to pass to chunks of pluggable code that might have need of many different kinds of - * functionality and you don't want to hard-code which types in the interface. - */ -interface ServiceHub { - val walletService: WalletService - val keyManagementService: KeyManagementService - val identityService: IdentityService - val storageService: StorageService - val networkService: MessagingService - val networkMapCache: NetworkMapCache - val monitoringService: MonitoringService - val clock: Clock - - /** - * Given a [LedgerTransaction], looks up all its dependencies in the local database, uses the identity service to map - * the [SignedTransaction]s the DB gives back into [LedgerTransaction]s, and then runs the smart contracts for the - * transaction. If no exception is thrown, the transaction is valid. - */ - fun verifyTransaction(ltx: LedgerTransaction) { - val dependencies = ltx.inputs.map { - storageService.validatedTransactions[it.txhash] ?: throw TransactionResolutionException(it.txhash) - } - val ltxns = dependencies.map { it.verifyToLedgerTransaction(identityService, storageService.attachments) } - TransactionGroup(setOf(ltx), ltxns.toSet()).verify() - } - - /** - * Given a list of [SignedTransaction]s, writes them to the local storage for validated transactions and then - * sends them to the wallet for further processing. - * - * TODO: Need to come up with a way for preventing transactions being written other than by this method. - * TODO: RecordingMap is test infrastructure. Refactor it away or find a way to ensure it's only used in tests. - * - * @param txs The transactions to record - * @param skipRecordingMap This is used in unit testing and can be ignored most of the time. - */ - fun recordTransactions(txs: List, skipRecordingMap: Boolean = false) { - val txns: Map = txs.groupBy { it.id }.mapValues { it.value.first() } - val txStorage = storageService.validatedTransactions - if (txStorage is RecordingMap && skipRecordingMap) - txStorage.putAllUnrecorded(txns) - else - txStorage.putAll(txns) - walletService.notifyAll(txs.map { it.tx }) - } -} diff --git a/src/main/kotlin/core/node/services/StorageServiceImpl.kt b/src/main/kotlin/core/node/subsystems/StorageServiceImpl.kt similarity index 93% rename from src/main/kotlin/core/node/services/StorageServiceImpl.kt rename to src/main/kotlin/core/node/subsystems/StorageServiceImpl.kt index e4365a3f5f..cfcffa75b4 100644 --- a/src/main/kotlin/core/node/services/StorageServiceImpl.kt +++ b/src/main/kotlin/core/node/subsystems/StorageServiceImpl.kt @@ -1,8 +1,10 @@ -package core.node.services +package core.node.subsystems import core.Party import core.SignedTransaction import core.crypto.SecureHash +import core.node.services.AttachmentStorage +import core.node.subsystems.StorageService import core.utilities.RecordingMap import org.slf4j.LoggerFactory import java.security.KeyPair diff --git a/src/main/kotlin/core/protocols/ProtocolLogic.kt b/src/main/kotlin/core/protocols/ProtocolLogic.kt index 36b5e0357d..364d216829 100644 --- a/src/main/kotlin/core/protocols/ProtocolLogic.kt +++ b/src/main/kotlin/core/protocols/ProtocolLogic.kt @@ -2,7 +2,7 @@ package core.protocols import co.paralleluniverse.fibers.Suspendable import core.messaging.MessageRecipients -import core.node.services.ServiceHub +import core.node.ServiceHub import core.utilities.ProgressTracker import core.utilities.UntrustworthyData import org.slf4j.Logger diff --git a/src/main/kotlin/core/protocols/ProtocolStateMachine.kt b/src/main/kotlin/core/protocols/ProtocolStateMachine.kt index b488e95260..eb3ecd8f79 100644 --- a/src/main/kotlin/core/protocols/ProtocolStateMachine.kt +++ b/src/main/kotlin/core/protocols/ProtocolStateMachine.kt @@ -9,7 +9,7 @@ import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import core.messaging.MessageRecipients import core.messaging.StateMachineManager -import core.node.services.ServiceHub +import core.node.ServiceHub import core.serialization.createKryo import core.utilities.UntrustworthyData import org.slf4j.Logger diff --git a/src/main/kotlin/core/testing/IRSSimulation.kt b/src/main/kotlin/core/testing/IRSSimulation.kt index bba97c5ff7..c2e51e44c1 100644 --- a/src/main/kotlin/core/testing/IRSSimulation.kt +++ b/src/main/kotlin/core/testing/IRSSimulation.kt @@ -8,7 +8,7 @@ import contracts.InterestRateSwap import core.* import core.crypto.SecureHash import core.testing.MockIdentityService -import core.node.services.linearHeadsOfType +import core.node.subsystems.linearHeadsOfType import core.utilities.JsonSupport import protocols.TwoPartyDealProtocol import java.time.LocalDate diff --git a/src/main/kotlin/core/testing/MockNetworkMapCache.kt b/src/main/kotlin/core/testing/MockNetworkMapCache.kt index 4c3dd41d3a..a6456faf23 100644 --- a/src/main/kotlin/core/testing/MockNetworkMapCache.kt +++ b/src/main/kotlin/core/testing/MockNetworkMapCache.kt @@ -11,7 +11,7 @@ import co.paralleluniverse.common.util.VisibleForTesting import core.Party import core.crypto.DummyPublicKey import core.messaging.SingleMessageRecipient -import core.node.services.InMemoryNetworkMapCache +import core.node.subsystems.InMemoryNetworkMapCache import core.node.NodeInfo /** diff --git a/src/main/kotlin/core/testing/TradeSimulation.kt b/src/main/kotlin/core/testing/TradeSimulation.kt index 85e3f2f1df..c8721e502f 100644 --- a/src/main/kotlin/core/testing/TradeSimulation.kt +++ b/src/main/kotlin/core/testing/TradeSimulation.kt @@ -4,7 +4,7 @@ import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.ListenableFuture import contracts.CommercialPaper import core.* -import core.node.services.NodeWalletService +import core.node.subsystems.NodeWalletService import core.utilities.BriefLogFormatter import protocols.TwoPartyTradeProtocol import java.time.Instant diff --git a/src/main/kotlin/demos/IRSDemo.kt b/src/main/kotlin/demos/IRSDemo.kt index c5cb5f311f..d526716a52 100644 --- a/src/main/kotlin/demos/IRSDemo.kt +++ b/src/main/kotlin/demos/IRSDemo.kt @@ -8,6 +8,7 @@ import core.node.Node import core.node.NodeConfiguration import core.node.NodeConfigurationFromConfig import core.node.NodeInfo +import core.node.subsystems.ArtemisMessagingService import core.node.services.* import core.serialization.deserialize import core.utilities.BriefLogFormatter diff --git a/src/main/kotlin/demos/RateFixDemo.kt b/src/main/kotlin/demos/RateFixDemo.kt index c70cc7a9ba..83bc6a18b4 100644 --- a/src/main/kotlin/demos/RateFixDemo.kt +++ b/src/main/kotlin/demos/RateFixDemo.kt @@ -5,7 +5,7 @@ import core.* import core.node.Node import core.node.NodeConfiguration import core.node.NodeInfo -import core.node.services.ArtemisMessagingService +import core.node.subsystems.ArtemisMessagingService import core.node.services.NodeInterestRates import core.node.services.ServiceType import core.serialization.deserialize diff --git a/src/main/kotlin/demos/TraderDemo.kt b/src/main/kotlin/demos/TraderDemo.kt index d9eb27509d..c535ff8950 100644 --- a/src/main/kotlin/demos/TraderDemo.kt +++ b/src/main/kotlin/demos/TraderDemo.kt @@ -12,6 +12,8 @@ import core.node.Node import core.node.NodeConfiguration import core.node.NodeConfigurationFromConfig import core.node.NodeInfo +import core.node.subsystems.ArtemisMessagingService +import core.node.subsystems.NodeWalletService import core.node.services.* import core.protocols.ProtocolLogic import core.serialization.deserialize diff --git a/src/main/kotlin/demos/protocols/UpdateBusinessDayProtocol.kt b/src/main/kotlin/demos/protocols/UpdateBusinessDayProtocol.kt index 56c05d86f9..fa43e6f642 100644 --- a/src/main/kotlin/demos/protocols/UpdateBusinessDayProtocol.kt +++ b/src/main/kotlin/demos/protocols/UpdateBusinessDayProtocol.kt @@ -6,7 +6,7 @@ import contracts.InterestRateSwap import core.StateAndRef import core.node.Node import core.node.NodeInfo -import core.node.services.linearHeadsOfType +import core.node.subsystems.linearHeadsOfType import core.protocols.ProtocolLogic import core.random63BitValue import core.serialization.deserialize diff --git a/src/main/kotlin/protocols/FetchDataProtocol.kt b/src/main/kotlin/protocols/FetchDataProtocol.kt index 230fdaeb23..f4366ce4f9 100644 --- a/src/main/kotlin/protocols/FetchDataProtocol.kt +++ b/src/main/kotlin/protocols/FetchDataProtocol.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.fibers.Suspendable import core.NamedByHash import core.crypto.SecureHash import core.messaging.SingleMessageRecipient -import core.node.services.DataVendingService +import core.node.subsystems.DataVendingService import core.protocols.ProtocolLogic import core.random63BitValue import core.utilities.UntrustworthyData diff --git a/src/test/kotlin/core/MockServices.kt b/src/test/kotlin/core/MockServices.kt index 73f1eae9cc..43e09f695f 100644 --- a/src/test/kotlin/core/MockServices.kt +++ b/src/test/kotlin/core/MockServices.kt @@ -3,6 +3,8 @@ package core import com.codahale.metrics.MetricRegistry import core.crypto.* import core.messaging.MessagingService +import core.node.ServiceHub +import core.node.subsystems.* import core.node.services.* import core.serialization.SerializedBytes import core.serialization.deserialize diff --git a/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt b/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt index 70bc849d19..6202657f06 100644 --- a/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt +++ b/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt @@ -6,6 +6,11 @@ import core.* import core.crypto.SecureHash import core.node.NodeConfiguration import core.node.NodeInfo +import core.node.ServiceHub +import core.node.subsystems.NodeWalletService +import core.node.subsystems.StorageService +import core.node.subsystems.StorageServiceImpl +import core.node.subsystems.Wallet import core.node.services.* import core.testing.InMemoryMessagingNetwork import core.testing.MockNetwork diff --git a/src/test/kotlin/core/node/services/ArtemisMessagingServiceTests.kt b/src/test/kotlin/core/node/subsystems/ArtemisMessagingServiceTests.kt similarity index 94% rename from src/test/kotlin/core/node/services/ArtemisMessagingServiceTests.kt rename to src/test/kotlin/core/node/subsystems/ArtemisMessagingServiceTests.kt index 369fc0d99a..6575542eb3 100644 --- a/src/test/kotlin/core/node/services/ArtemisMessagingServiceTests.kt +++ b/src/test/kotlin/core/node/subsystems/ArtemisMessagingServiceTests.kt @@ -1,7 +1,8 @@ -package core.node.services +package core.node.subsystems import core.messaging.Message import core.messaging.MessageRecipients +import core.node.subsystems.ArtemisMessagingService import core.testutils.freeLocalHostAndPort import org.assertj.core.api.Assertions.assertThat import org.junit.After diff --git a/src/test/kotlin/core/node/services/InMemoryNetworkMapCacheTest.kt b/src/test/kotlin/core/node/subsystems/InMemoryNetworkMapCacheTest.kt similarity index 94% rename from src/test/kotlin/core/node/services/InMemoryNetworkMapCacheTest.kt rename to src/test/kotlin/core/node/subsystems/InMemoryNetworkMapCacheTest.kt index 7d639f487f..1fcaeaa539 100644 --- a/src/test/kotlin/core/node/services/InMemoryNetworkMapCacheTest.kt +++ b/src/test/kotlin/core/node/subsystems/InMemoryNetworkMapCacheTest.kt @@ -1,4 +1,4 @@ -package core.node.services +package core.node.subsystems import core.testing.MockNetwork import org.junit.Before diff --git a/src/test/kotlin/core/node/services/NodeWalletServiceTest.kt b/src/test/kotlin/core/node/subsystems/NodeWalletServiceTest.kt similarity index 96% rename from src/test/kotlin/core/node/services/NodeWalletServiceTest.kt rename to src/test/kotlin/core/node/subsystems/NodeWalletServiceTest.kt index 8602265984..e846bf67be 100644 --- a/src/test/kotlin/core/node/services/NodeWalletServiceTest.kt +++ b/src/test/kotlin/core/node/subsystems/NodeWalletServiceTest.kt @@ -1,9 +1,9 @@ -package core.node.services +package core.node.subsystems import contracts.Cash import core.* -import core.node.services.NodeWalletService -import core.node.services.ServiceHub +import core.node.subsystems.NodeWalletService +import core.node.ServiceHub import core.testutils.* import core.utilities.BriefLogFormatter import org.junit.After