As we are implementing same, Shearing Tx among multiple nodes, got some issues:
1. To list of participants we are getting from URL:
val otherParty1 = services.identityService.partyFromName(partyName1) //NodeA
val otherParty2 = services.identityService.partyFromName(partyName2) //NodeB
2. To get state we use :
val state = TestOrderState(po, services.myInfo.legalIdentity, otherParty1, TestOrderContract())
But Here I have two parties(NodeA and NodeB).
So as per my understanding, I should not create 2 state…as I believe we have to share the state between the Nodes.
3. In my Flows , I used
subFlow(BroadcastTransactionFlow(ntx, setOf(otherParty, otherParty1)))
When It goes to send(msg,participants), It invokes same method for both PartyA and PartyB but the Tx is recorded only for PartyA as I created state in ExampleApi using PartyA.
Please suggest how to resolve the issue.