moar logs
This commit is contained in:
parent
609341631d
commit
6c54cc679c
@ -19,7 +19,7 @@ public class GameProposalContract implements net.corda.v5.ledger.utxo.Contract {
|
||||
requireThat(trx.getCommands().size() == 1, GameCommand.REQUIRE_SINGLE_COMMAND);
|
||||
final GameCommand command = getSingleCommand(trx, GameCommand.class);
|
||||
|
||||
log.info("GameProposalContract.verify() " +command);
|
||||
log.info("GameProposalContract.verify() " +command.getAction());
|
||||
|
||||
switch (command.getAction()) {
|
||||
case GAME_PROPOSAL_CREATE:
|
||||
@ -42,7 +42,7 @@ public class GameProposalContract implements net.corda.v5.ledger.utxo.Contract {
|
||||
throw new GameCommand.ActionException();
|
||||
}
|
||||
|
||||
log.info("GameProposalContract.verify() " +command + " [OK]");
|
||||
log.info("GameProposalContract.verify() " +command.getAction() + " [OK]");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ public class GameResultContract implements net.corda.v5.ledger.utxo.Contract {
|
||||
requireThat(trx.getCommands().size() == 1, GameCommand.REQUIRE_SINGLE_COMMAND);
|
||||
final GameCommand command = getSingleCommand(trx, GameCommand.class);
|
||||
|
||||
log.info("GameResultContract.verify() " +command.getAction());
|
||||
|
||||
switch (command.getAction()) {
|
||||
case SURRENDER:
|
||||
command.validateSurrender(trx);
|
||||
@ -35,6 +37,8 @@ public class GameResultContract implements net.corda.v5.ledger.utxo.Contract {
|
||||
default:
|
||||
throw new GameCommand.ActionException();
|
||||
}
|
||||
|
||||
log.info("GameResultContract.verify() " +command.getAction() + " [OK]");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
public SecureHash call() {
|
||||
log.info("GameState commit started");
|
||||
|
||||
try {
|
||||
/*
|
||||
* Calls the Corda provided finalise() function which gather signatures from the counterparty,
|
||||
* notarises the transaction and persists the transaction to each party's vault.
|
||||
@ -71,5 +72,10 @@ public class CommitTrx implements SubFlow<SecureHash> {
|
||||
|
||||
log.info("GameState commit " +trxId);
|
||||
return trxId;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warn("GameState finality failed", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user