1
This commit is contained in:
parent
b6b1358131
commit
8c1544d160
@ -52,6 +52,7 @@ 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,
|
||||||
|
@ -57,12 +57,14 @@ 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)
|
||||||
throw new ParticipantException("Issuer", conterpartyName, info.issuer);
|
throw new ParticipantException("Issuer", conterpartyName, info.issuer);
|
||||||
|
|
||||||
final var myName = memberLookup.myInfo().getName();
|
final var myName = memberLookup.myInfo().getName();
|
||||||
|
System.out.println(" my name" + myName + " opponentName "+ conterpartyName);
|
||||||
if (myName.getOrganizationUnit().equals("Custodian"))
|
if (myName.getOrganizationUnit().equals("Custodian"))
|
||||||
return; // Custodian shall not validate state's counterparty
|
return; // Custodian shall not validate state's counterparty
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user