This commit is contained in:
djmil 2023-11-27 16:30:56 +01:00
parent 8c1544d160
commit d647d4eebf
3 changed files with 4 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public class GameResultCommiter implements SubFlow<SecureHash> {
.setNotary(gameBoardSar.getState().getNotaryName()) .setNotary(gameBoardSar.getState().getNotaryName())
.setTimeWindowUntil(Instant.now().plusMillis(Duration.ofDays(1).toMillis())) .setTimeWindowUntil(Instant.now().plusMillis(Duration.ofDays(1).toMillis()))
.toSignedTransaction(); .toSignedTransaction();
System.out.println("GameResultCommiter");
return this.flowEngine.subFlow( return this.flowEngine.subFlow(
new CommitTrx(gameResultTrx, new CommitTrx(gameResultTrx,
getCounterparty(gameResult), getCounterparty(gameResult),

View File

@ -52,7 +52,6 @@ public class CommitTrx implements SubFlow<SecureHash> {
@Suspendable @Suspendable
public SecureHash call() { public SecureHash call() {
log.info("GameState commit started"); log.info("GameState commit started");
System.out.println("Surrender commit started");
/* /*
* Calls the Corda provided finalise() function which gather signatures from the counterparty, * Calls the Corda provided finalise() function which gather signatures from the counterparty,
@ -63,6 +62,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
List<FlowSession> sessionsList = new LinkedList<FlowSession>(Arrays.asList(session)); List<FlowSession> sessionsList = new LinkedList<FlowSession>(Arrays.asList(session));
if (custodyName != null) { if (custodyName != null) {
System.out.println("we have a custoduan" + custodyName.getCommonName() );
sessionsList.add(flowMessaging.initiateFlow(custodyName)); sessionsList.add(flowMessaging.initiateFlow(custodyName));
} }
@ -71,6 +71,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
.getTransaction() .getTransaction()
.getId(); .getId();
System.out.println("Trx commited "+trxId);
log.info("GameState commit " +trxId); log.info("GameState commit " +trxId);
return trxId; return trxId;
} }

View File

@ -32,7 +32,7 @@ public class CommitTrxResponder implements ResponderFlow {
public void call(FlowSession session) { public void call(FlowSession session) {
UtxoTransactionValidator txValidator = trxToValidate -> { UtxoTransactionValidator txValidator = trxToValidate -> {
try { try {
checkParticipants(session, trxToValidate); //checkParticipants(session, trxToValidate);
/* /*
* Other checks / actions ? * Other checks / actions ?