core.node.services / ServiceHub

ServiceHub

interface ServiceHub

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 dont want to hard-code which types in the interface.



Properties

identityService abstract val identityService: IdentityService
keyManagementService abstract val keyManagementService: KeyManagementService
networkMapService abstract val networkMapService: NetworkMap
networkService abstract val networkService: MessagingService
storageService abstract val storageService: StorageService
walletService abstract val walletService: WalletService

Functions

verifyTransaction open fun verifyTransaction(ltx: LedgerTransaction): Unit

Given a LedgerTransaction, looks up all its dependencies in the local database, uses the identity service to map the SignedTransactions the DB gives back into LedgerTransactions, and then runs the smart contracts for the transaction. If no exception is thrown, the transaction is valid.