diff --git a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt index 33e160c742..7bd9623f52 100644 --- a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt +++ b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt @@ -89,7 +89,7 @@ class NodeMonitorModel { vaultUpdates.startWith(initialVaultUpdate).subscribe(vaultUpdatesSubject) // Transactions - val (transactions, newTransactions) = proxy.verifiedTransactionsFeed() + val (transactions, newTransactions) = proxy.internalVerifiedTransactionsFeed() newTransactions.startWith(transactions).subscribe(transactionsSubject) // SM -> TX mapping diff --git a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt index a0aa250f88..fab679795b 100644 --- a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt +++ b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt @@ -157,15 +157,21 @@ interface CordaRPCOps : RPCOps { // DOCEND VaultTrackAPIHelpers /** - * Returns a list of all recorded transactions. + * @suppress Returns a list of all recorded transactions. + * + * TODO This method should be removed once SGX work is finalised and the design of the corresponding API using [FilteredTransaction] can be started */ - fun verifiedTransactionsSnapshot(): List + @Deprecated("This method is intended only for internal use and will be removed from the public API soon.") + fun internalVerifiedTransactionsSnapshot(): List /** - * Returns a data feed of all recorded transactions and an observable of future recorded ones. + * @suppress Returns a data feed of all recorded transactions and an observable of future recorded ones. + * + * TODO This method should be removed once SGX work is finalised and the design of the corresponding API using [FilteredTransaction] can be started */ + @Deprecated("This method is intended only for internal use and will be removed from the public API soon.") @RPCReturnsObservables - fun verifiedTransactionsFeed(): DataFeed, SignedTransaction> + fun internalVerifiedTransactionsFeed(): DataFeed, SignedTransaction> /** * Returns a snapshot list of existing state machine id - recorded transaction hash mappings. diff --git a/docs/source/example-code/src/main/kotlin/net/corda/docs/ClientRpcTutorial.kt b/docs/source/example-code/src/main/kotlin/net/corda/docs/ClientRpcTutorial.kt index 64992a788f..f64503f2c0 100644 --- a/docs/source/example-code/src/main/kotlin/net/corda/docs/ClientRpcTutorial.kt +++ b/docs/source/example-code/src/main/kotlin/net/corda/docs/ClientRpcTutorial.kt @@ -63,7 +63,7 @@ fun main(args: Array) { // END 2 // START 3 - val (transactions: List, futureTransactions: Observable) = proxy.verifiedTransactionsFeed() + val (transactions: List, futureTransactions: Observable) = proxy.internalVerifiedTransactionsFeed() // END 3 // START 4 diff --git a/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt b/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt index 0e76592081..64f26c7c51 100644 --- a/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt +++ b/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt @@ -71,13 +71,13 @@ class CordaRPCOpsImpl( } } - override fun verifiedTransactionsSnapshot(): List { - val (snapshot, updates) = verifiedTransactionsFeed() + override fun internalVerifiedTransactionsSnapshot(): List { + val (snapshot, updates) = internalVerifiedTransactionsFeed() updates.notUsed() return snapshot } - override fun verifiedTransactionsFeed(): DataFeed, SignedTransaction> { + override fun internalVerifiedTransactionsFeed(): DataFeed, SignedTransaction> { return database.transaction { services.validatedTransactions.track() } diff --git a/node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt b/node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt index bf7e9a375d..ebfd43b407 100644 --- a/node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt +++ b/node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt @@ -137,7 +137,7 @@ class CordaRPCOpsImplTest { fun `issue and move`() { aliceNode.database.transaction { stateMachineUpdates = rpc.stateMachinesFeed().updates - transactions = rpc.verifiedTransactionsFeed().updates + transactions = rpc.internalVerifiedTransactionsFeed().updates vaultTrackCash = rpc.vaultTrackBy().updates } diff --git a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt index c883411e67..1b24d48640 100644 --- a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt +++ b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt @@ -131,7 +131,7 @@ class AttachmentDemoFlow(val otherSide: Party, val notary: Party, val hash: Secu fun recipient(rpc: CordaRPCOps) { println("Waiting to receive transaction ...") - val stx = rpc.verifiedTransactionsFeed().updates.toBlocking().first() + val stx = rpc.internalVerifiedTransactionsFeed().updates.toBlocking().first() val wtx = stx.tx if (wtx.attachments.isNotEmpty()) { if (wtx.outputs.isNotEmpty()) { diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/views/NodeTerminalView.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/views/NodeTerminalView.kt index 51905c0b6f..b67b4b55d0 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/views/NodeTerminalView.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/views/NodeTerminalView.kt @@ -187,7 +187,7 @@ class NodeTerminalView : Fragment() { private fun initialise(config: NodeConfig, ops: CordaRPCOps) { try { - val (txInit, txNext) = ops.verifiedTransactionsFeed() + val (txInit, txNext) = ops.internalVerifiedTransactionsFeed() val (stateInit, stateNext) = ops.vaultTrackBy(paging = pageSpecification) txCount = txInit.size