better sessionlist
This commit is contained in:
parent
2cfe68947b
commit
1ce96448db
@ -58,12 +58,13 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
* notarises the transaction and persists the transaction to each party's vault.
|
||||
*/
|
||||
|
||||
final FlowSession session = flowMessaging.initiateFlow(this.counterpartyName);
|
||||
List<FlowSession> sessionsList = new LinkedList<FlowSession>(Arrays.asList(session));
|
||||
final FlowSession counterpartySession = flowMessaging.initiateFlow(this.counterpartyName);
|
||||
|
||||
if (custodyName != null) {
|
||||
sessionsList.add(flowMessaging.initiateFlow(custodyName));
|
||||
}
|
||||
List<FlowSession> sessionsList = (this.custodyName != null)
|
||||
? Arrays.asList(counterpartySession, flowMessaging.initiateFlow(this.custodyName))
|
||||
: Arrays.asList(counterpartySession);
|
||||
|
||||
System.out.println("sessionsList size " + sessionsList.size());
|
||||
|
||||
final SecureHash trxId = ledgerService
|
||||
.finalize(this.utxTrxCandidate, sessionsList)
|
||||
|
@ -34,19 +34,19 @@ public class CommitTrxResponder implements ResponderFlow {
|
||||
log.info("----> CommitTrxResponder: Session "+session);
|
||||
try {
|
||||
UtxoTransactionValidator txValidator = trxToValidate -> {
|
||||
log.info("----> Checking participants... ");
|
||||
log.info("----> Checking participants... " + trxToValidate);
|
||||
//checkParticipants(session, trxToValidate);
|
||||
|
||||
/*
|
||||
* Other checks / actions ?
|
||||
*/
|
||||
|
||||
log.info("Approval for " + trxToValidate.getId());
|
||||
//log.info("Approval for " + trxToValidate.getId());
|
||||
};
|
||||
|
||||
if (utxoLedgerService == null) {
|
||||
log.error("utxoLedgerService is NULL");
|
||||
return;
|
||||
return;
|
||||
}
|
||||
UtxoSignedTransaction finalizedSignedTransaction = this.utxoLedgerService
|
||||
.receiveFinality(session, txValidator)
|
||||
|
Loading…
Reference in New Issue
Block a user