1
This commit is contained in:
parent
b6b1358131
commit
8c1544d160
@ -52,6 +52,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
@Suspendable
|
||||
public SecureHash call() {
|
||||
log.info("GameState commit started");
|
||||
System.out.println("Surrender commit started");
|
||||
|
||||
/*
|
||||
* Calls the Corda provided finalise() function which gather signatures from the counterparty,
|
||||
|
@ -57,12 +57,14 @@ 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)
|
||||
throw new ParticipantException("Issuer", conterpartyName, info.issuer);
|
||||
|
||||
final var myName = memberLookup.myInfo().getName();
|
||||
System.out.println(" my name" + myName + " opponentName "+ conterpartyName);
|
||||
if (myName.getOrganizationUnit().equals("Custodian"))
|
||||
return; // Custodian shall not validate state's counterparty
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user