Skip to content

Commit

Permalink
feat: writing the node service provider id in to the CSV file
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Mar 15, 2024
1 parent 5cdc97c commit 3125bfe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/main/java/reputation/node/models/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class Node implements NodeTypeService, ILedgerSubscriber {
private NodeCredibility nodeCredibility;
private CsvWriterService csvWriter;
private String credibilityHeader;
private String[] csvData = new String[9];
private String[] csvData = new String[10];
private long startedExperiment;
private boolean flagStartedExperiment = true;
private static final Logger logger = Logger.getLogger(Node.class.getName());
Expand Down Expand Up @@ -635,6 +635,9 @@ private void requestAndEvaluateNodeService(
logger.info("EVALUATION VALUE");
logger.info(String.valueOf(evaluationValue));

/* Salvando o ID do prestador do serviço. */
this.csvData[9] = nodeId;

this.nodeType.getNode()
.evaluateServiceProvider(
nodeId,
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/OSGI-INF/blueprint/blueprint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<cm:property name="useCredibility" value="true" />
<cm:property name="useLatestCredibility" value="true" />
<cm:property name="debugModeValue" value="true" />
<cm:property name="credibilityHeader" value="Node_ID,Type,C(n),R,Tr(n),Cr_old(n),Cr_new(n),Started_experiment_time,wrote_file_time" />
<cm:property name="credibilityHeader" value="Node_ID,Type,C(n),R,Tr(n),Cr_old(n),Cr_new(n),Started_experiment_time,wrote_file_time,Node_provider_ID" />
</cm:default-properties>
</cm:property-placeholder>
</blueprint>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ useCredibility=true
useLatestCredibility=true
# Cabeçalho do experimento de credibilidades.
# Obs: Separe somente utilizando vírgula
credibilityHeader=Node_ID,Type,C(n),R,Tr(n),Cr_old(n),Cr_new(n),Started_experiment_time,wrote_file_time
credibilityHeader=Node_ID,Type,C(n),R,Tr(n),Cr_old(n),Cr_new(n),Started_experiment_time,wrote_file_time,Node_provider_ID

debugModeValue=true

0 comments on commit 3125bfe

Please sign in to comment.