Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@josecoll
Copy link

No description provided.

@josecoll josecoll requested a review from shamsasari June 27, 2017 14:14
override fun call() {
serviceHub.vaultService.unconsumedStates<Cash.State>().filter { true }
waitForLedgerCommit(SecureHash.zeroHash)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd take this opportunity to delete this test

private class VaultQueryFlow : FlowLogic<List<StateAndRef<ContractState>>>() {
@Suspendable
override fun call(): List<StateAndRef<ContractState>> {
return serviceHub.vaultQueryService.queryBy<ContractState>().states
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing waitForLedgerCommit

val stx = node1.services.signInitialTransaction(ptx)

node1.registerFlowFactory(VaultQueryFlow::class) {
WaitingFlows.Committer(it)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to do the map

@josecoll josecoll merged commit 4139cf4 into master Jun 27, 2017
@josecoll josecoll deleted the colljos-tokenizable-vault-query branch June 27, 2017 16:22
kchalkias pushed a commit that referenced this pull request Jun 27, 2017
* Added vault query as tokenizable service.

* Add JUnit test to test access of vault query service within a flow.

* Improved JUnit test to correctly validate tokenizable behaviour.

* Minor cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants