Skip to content

Commit

Permalink
added some logs, to be reverted
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Rojo <[email protected]>
  • Loading branch information
freemanzMrojo committed Aug 19, 2022
1 parent 952085d commit 56a0ea3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,15 @@ public Optional<PrivacyGroup> findPrivacyGroupByGroupId(
privateTransactionSimulator.process(
privacyGroupId, buildCallParams(GET_PARTICIPANTS_METHOD_SIGNATURE));

LOG.error("LLEGA AQUI 1: " + privateTransactionSimulatorResultOptional.isPresent());

if (privateTransactionSimulatorResultOptional.isPresent()
&& privateTransactionSimulatorResultOptional.get().isSuccessful()) {
LOG.error("LLEGA AQUI 2: " + privateTransactionSimulatorResultOptional.get().getOutput());
final RLPInput rlpInput =
RLP.input(privateTransactionSimulatorResultOptional.get().getOutput());
if (rlpInput.nextSize() > 0) {
LOG.error("LLEGA AQUI 3: " + rlpInput.raw().toBase64String());
return Optional.of(
new PrivacyGroup(
privacyGroupId, PrivacyGroup.Type.FLEXIBLE, "", "", decodeList(rlpInput.raw())));
Expand Down Expand Up @@ -272,7 +276,9 @@ private Optional<String> buildAndSendAddPayload(
if (FlexibleUtil.isGroupAdditionTransaction(privateTransaction)) {
final List<PrivateTransactionMetadata> privateTransactionMetadataList =
buildTransactionMetadataList(privacyGroupId);
LOG.error("buildAndSendAddPayload ENTRA AQUI 1");
if (!privateTransactionMetadataList.isEmpty()) {
LOG.error("buildAndSendAddPayload ENTRA AQUI 2");
final List<PrivateTransactionWithMetadata> privateTransactionWithMetadataList =
retrievePrivateTransactions(
privacyGroupId, privateTransactionMetadataList, privacyUserId);
Expand All @@ -283,6 +289,8 @@ private Optional<String> buildAndSendAddPayload(
enclave.send(bytes.toBase64String(), privacyUserId, privateFor).getKey());
}
}
LOG.error("buildAndSendAddPayload ESTA VACIO");

return Optional.empty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public TransactionProcessingResult processTransaction(
final Function<Long, Hash> blockHashLookup,
final Bytes privacyGroupId) {
try {
LOG.trace("Starting private execution of {}", transaction);
LOG.error("Starting private execution of {}", transaction);

final Address senderAddress = transaction.getSender();
final EvmAccount maybePrivateSender = privateWorldState.getAccount(senderAddress);
Expand All @@ -110,7 +110,7 @@ public TransactionProcessingResult processTransaction(
}

final long previousNonce = sender.incrementNonce();
LOG.trace(
LOG.error(
"Incremented private sender {} nonce ({} -> {})",
senderAddress,
previousNonce,
Expand Down Expand Up @@ -142,7 +142,7 @@ public TransactionProcessingResult processTransaction(
final Address privateContractAddress =
Address.privateContractAddress(senderAddress, previousNonce, privacyGroupId);

LOG.debug(
LOG.error(
"Calculated contract address {} from sender {} with nonce {} and privacy group {}",
privateContractAddress,
senderAddress,
Expand Down

0 comments on commit 56a0ea3

Please sign in to comment.