File tree 1 file changed +6
-3
lines changed
src/main/java/reputation/node/models
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public class Node implements NodeTypeService, ILedgerSubscriber {
84
84
private boolean useCredibility ;
85
85
private boolean useLatestCredibility ;
86
86
private boolean useReputation ;
87
- private double reputationValue ;
87
+ private double reputationValue = 0.0 ;
88
88
private NodeCredibility nodeCredibility ;
89
89
private CsvWriterService csvWriter ;
90
90
private String credibilityHeader ;
@@ -652,6 +652,11 @@ private void requestAndEvaluateNodeService(
652
652
}
653
653
}
654
654
655
+ if (this .useReputation ) {
656
+ /* Salvando a reputação do nó */
657
+ this .csvData [10 ] = String .valueOf (this .reputationValue );
658
+ }
659
+
655
660
if (this .useCredibility ) {
656
661
/* Calculando a credibilidade deste nó */
657
662
nodeCredibility =
@@ -930,8 +935,6 @@ private float calculateCredibility(
930
935
this .csvData [7 ] = String .valueOf (startedExperiment );
931
936
/* Salvando o tempo em que calculou a nova credibilidade. */
932
937
this .csvData [8 ] = String .valueOf (System .currentTimeMillis ());
933
- /* Salvando a reputação do nó */
934
- this .csvData [10 ] = String .valueOf (this .reputationValue );
935
938
936
939
/* Escrevendo na blockchain a credibilidade calculado do nó avaliador */
937
940
try {
You can’t perform that action at this time.
0 commit comments