s
This commit is contained in:
parent
d647d4eebf
commit
cc297ef23c
@ -21,6 +21,7 @@ public class GameResultContract implements net.corda.v5.ledger.utxo.Contract {
|
||||
|
||||
switch (command.getAction()) {
|
||||
case SURRENDER:
|
||||
System.out.println("game surrender validate");
|
||||
command.validateSurrender(trx);
|
||||
break;
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
List<FlowSession> sessionsList = new LinkedList<FlowSession>(Arrays.asList(session));
|
||||
|
||||
if (custodyName != null) {
|
||||
System.out.println("we have a custoduan" + custodyName.getCommonName() );
|
||||
System.out.println("we have a custoduan " + custodyName.getCommonName() );
|
||||
sessionsList.add(flowMessaging.initiateFlow(custodyName));
|
||||
}
|
||||
|
||||
@ -72,6 +72,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
.getId();
|
||||
|
||||
System.out.println("Trx commited "+trxId);
|
||||
|
||||
log.info("GameState commit " +trxId);
|
||||
return trxId;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class CommitTrxResponder implements ResponderFlow {
|
||||
UtxoTransactionValidator txValidator = trxToValidate -> {
|
||||
try {
|
||||
//checkParticipants(session, trxToValidate);
|
||||
|
||||
System.out.println("commit responder");
|
||||
/*
|
||||
* Other checks / actions ?
|
||||
*/
|
||||
@ -57,7 +57,7 @@ public class CommitTrxResponder implements ResponderFlow {
|
||||
|
||||
@Suspendable
|
||||
void checkParticipants(FlowSession session, UtxoLedgerTransaction gameStateUtxo) throws ParticipantException {
|
||||
System.out.println("commit responder");
|
||||
|
||||
final GameInfo info = new GameInfo(gameStateUtxo);
|
||||
final var conterpartyName = session.getCounterparty();
|
||||
if (info.issuer.compareTo(conterpartyName) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user