Slide 34
Slide 34 text
34 Build Software to Test Software
exactpro.com
Fun RegisterTradeFlow::call
progressTracker.currentStep = GENERATING_TRANSACTION
val notary = serviceHub.networkMapCache.notaryIdentities.first()
val tradeState = TradeContract.State(
tradeId = fixMessage.tradeId,
symbol = fixMessage.symbol,
side = fixMessage.side,
price = fixMessage.price,
size = fixMessage.size,
buyerOrSeller = serviceHub.myInfo.legalIdentities.first(),
ccp = ccp,
cleared = false)
val txCommand = Command(
TradeContract.Commands.RegisterTrade(),
listOf(ourIdentity.owningKey, ccp.owningKey))
val txBuilder = TransactionBuilder(notary)
.addOutputState(tradeState, TradeContract.ID)
.addCommand(txCommand)
052
053
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
main/.../flow/RegisterTradeFlow.kt