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.
|
* 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)
|
||||||
|
@ -34,19 +34,19 @@ 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) {
|
||||||
log.error("utxoLedgerService is NULL");
|
log.error("utxoLedgerService is NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UtxoSignedTransaction finalizedSignedTransaction = this.utxoLedgerService
|
UtxoSignedTransaction finalizedSignedTransaction = this.utxoLedgerService
|
||||||
.receiveFinality(session, txValidator)
|
.receiveFinality(session, txValidator)
|
||||||
|
Loading…
Reference in New Issue
Block a user