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()) {
|
switch (command.getAction()) {
|
||||||
case SURRENDER:
|
case SURRENDER:
|
||||||
|
System.out.println("game surrender validate");
|
||||||
command.validateSurrender(trx);
|
command.validateSurrender(trx);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
|||||||
.getId();
|
.getId();
|
||||||
|
|
||||||
System.out.println("Trx commited "+trxId);
|
System.out.println("Trx commited "+trxId);
|
||||||
|
|
||||||
log.info("GameState commit " +trxId);
|
log.info("GameState commit " +trxId);
|
||||||
return trxId;
|
return trxId;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class CommitTrxResponder implements ResponderFlow {
|
|||||||
UtxoTransactionValidator txValidator = trxToValidate -> {
|
UtxoTransactionValidator txValidator = trxToValidate -> {
|
||||||
try {
|
try {
|
||||||
//checkParticipants(session, trxToValidate);
|
//checkParticipants(session, trxToValidate);
|
||||||
|
System.out.println("commit responder");
|
||||||
/*
|
/*
|
||||||
* Other checks / actions ?
|
* Other checks / actions ?
|
||||||
*/
|
*/
|
||||||
@ -57,7 +57,7 @@ public class CommitTrxResponder implements ResponderFlow {
|
|||||||
|
|
||||||
@Suspendable
|
@Suspendable
|
||||||
void checkParticipants(FlowSession session, UtxoLedgerTransaction gameStateUtxo) throws ParticipantException {
|
void checkParticipants(FlowSession session, UtxoLedgerTransaction gameStateUtxo) throws ParticipantException {
|
||||||
System.out.println("commit responder");
|
|
||||||
final GameInfo info = new GameInfo(gameStateUtxo);
|
final GameInfo info = new GameInfo(gameStateUtxo);
|
||||||
final var conterpartyName = session.getCounterparty();
|
final var conterpartyName = session.getCounterparty();
|
||||||
if (info.issuer.compareTo(conterpartyName) != 0)
|
if (info.issuer.compareTo(conterpartyName) != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user