better sessionlist

This commit is contained in:
djmil 2023-11-28 22:39:58 +01:00
parent 2cfe68947b
commit 1ce96448db
2 changed files with 9 additions and 8 deletions

View File

@ -58,12 +58,13 @@ public class CommitTrx implements SubFlow<SecureHash> {
* notarises the transaction and persists the transaction to each party's vault. * notarises the transaction and persists the transaction to each party's vault.
*/ */
final FlowSession session = flowMessaging.initiateFlow(this.counterpartyName); final FlowSession counterpartySession = flowMessaging.initiateFlow(this.counterpartyName);
List<FlowSession> sessionsList = new LinkedList<FlowSession>(Arrays.asList(session));
if (custodyName != null) { List<FlowSession> sessionsList = (this.custodyName != null)
sessionsList.add(flowMessaging.initiateFlow(custodyName)); ? Arrays.asList(counterpartySession, flowMessaging.initiateFlow(this.custodyName))
} : Arrays.asList(counterpartySession);
System.out.println("sessionsList size " + sessionsList.size());
final SecureHash trxId = ledgerService final SecureHash trxId = ledgerService
.finalize(this.utxTrxCandidate, sessionsList) .finalize(this.utxTrxCandidate, sessionsList)

View File

@ -34,14 +34,14 @@ public class CommitTrxResponder implements ResponderFlow {
log.info("----> CommitTrxResponder: Session "+session); log.info("----> CommitTrxResponder: Session "+session);
try { try {
UtxoTransactionValidator txValidator = trxToValidate -> { UtxoTransactionValidator txValidator = trxToValidate -> {
log.info("----> Checking participants... "); log.info("----> Checking participants... " + trxToValidate);
//checkParticipants(session, trxToValidate); //checkParticipants(session, trxToValidate);
/* /*
* Other checks / actions ? * Other checks / actions ?
*/ */
log.info("Approval for " + trxToValidate.getId()); //log.info("Approval for " + trxToValidate.getId());
}; };
if (utxoLedgerService == null) { if (utxoLedgerService == null) {