trx responder
This commit is contained in:
parent
ac423244a1
commit
d12fcee5cc
@ -2,7 +2,7 @@
|
|||||||
trust.store=classpath:keystore/truststore.p12
|
trust.store=classpath:keystore/truststore.p12
|
||||||
trust.store.password=test123
|
trust.store.password=test123
|
||||||
|
|
||||||
corda.host=https://192.168.10.8
|
corda.host=https://localhost
|
||||||
corda.port=8888
|
corda.port=8888
|
||||||
corda.root.login=admin
|
corda.root.login=admin
|
||||||
corda.root.passw=admin
|
corda.root.passw=admin
|
||||||
|
@ -30,10 +30,12 @@ public class CommitTrxResponder implements ResponderFlow {
|
|||||||
@Suspendable
|
@Suspendable
|
||||||
@Override
|
@Override
|
||||||
public void call(FlowSession session) {
|
public void call(FlowSession session) {
|
||||||
|
log.debug("_______ CommitTrxResponder Session: " + session);
|
||||||
|
log.debug("_______ CommitTrxResponder, myName: " + memberLookup.myInfo().getName());
|
||||||
|
|
||||||
UtxoTransactionValidator txValidator = trxToValidate -> {
|
UtxoTransactionValidator txValidator = trxToValidate -> {
|
||||||
try {
|
try {
|
||||||
//checkParticipants(session, trxToValidate);
|
checkParticipants(session, trxToValidate);
|
||||||
System.out.println("Approval for " + trxToValidate.getId());
|
|
||||||
/*
|
/*
|
||||||
* Other checks / actions ?
|
* Other checks / actions ?
|
||||||
*/
|
*/
|
||||||
@ -53,6 +55,9 @@ public class CommitTrxResponder implements ResponderFlow {
|
|||||||
// Log Corda's specific message about finality validation failure
|
// Log Corda's specific message about finality validation failure
|
||||||
log.warn(e.getMessage());
|
log.warn(e.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (Throwable t) {
|
||||||
|
log.debug("_______ CommitTrxResponder: bad exception", t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suspendable
|
@Suspendable
|
||||||
@ -64,7 +69,7 @@ public class CommitTrxResponder implements ResponderFlow {
|
|||||||
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