corda/samples/trader-demo
Shams Asari e8b6f5f2f2
CORDA-2005: FinalityFlow has been made into an inlined flow to resolve issue with FinalityHandler (#4050)
FinalityHandler is insecure in that it is open to receive any transaction from any party.

Any CorDapp targeting platform version 4 or above is required use the new c'tors which take in FlowSession objects to the counterpart flow. This flow must subcall ReceiveFinalityFlow to receive and record the finalised transaction.

Old CorDapps (with target platform version < 4) will continue to work as previously. However if there are no old CorDapps loaded then the node will disable FinalityHandler.
2018-11-14 14:16:22 +00:00
..
src CORDA-2005: FinalityFlow has been made into an inlined flow to resolve issue with FinalityHandler (#4050) 2018-11-14 14:16:22 +00:00
build.gradle ENT-2509 - Make @InitiatedBy flows overridable via node config (#3960) 2018-10-23 16:45:07 +01:00
README.md [CORDA-446] Clean up other mentions of network map node and logic (#1974) 2017-11-01 14:25:48 +00:00

Trader demo

This demo brings up four nodes: Bank A, Bank B, Bank Of Corda, and a notary node that they all use. Bank A will be the buyer, and requests some cash from the Bank of Corda in order to acquire commercial paper from Bank B, the seller.

To run from the command line in Unix:

  1. Run ./gradlew samples:trader-demo:deployNodes to create a set of configs and installs under samples/trader-demo/build/nodes
  2. Run ./samples/trader-demo/build/nodes/runnodes to open up four new terminals with the four nodes
  3. Run ./gradlew samples:trader-demo:runBank to instruct the bank node to issue cash and commercial paper to the buyer and seller nodes respectively
  4. Run ./gradlew samples:trader-demo:runSeller to trigger the transaction. If you entered flow watch, you can see flows running on both sides of transaction. Additionally you should see final trade information displayed to your terminal

To run from the command line in Windows:

  1. Run gradlew samples:trader-demo:deployNodes to create a set of configs and installs under samples\trader-demo\build\nodes
  2. Run samples\trader-demo\build\nodes\runnodes to open up four new terminals with the four nodes
  3. Run gradlew samples:trader-demo:runBank to instruct the buyer node to request issuance of some cash from the Bank of Corda node
  4. Run gradlew samples:trader-demo:runSeller to trigger the transaction. If you entered flow watch, you can see flows running on both sides of transaction. Additionally you should see final trade information displayed to your terminal