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 3
3
import br .uefs .larsid .extended .mapping .devices .services .IDevicePropertiesManager ;
4
4
import br .ufba .dcc .wiser .soft_iot .entities .Device ;
5
5
import br .ufba .dcc .wiser .soft_iot .entities .Sensor ;
6
-
7
6
import com .google .gson .JsonElement ;
8
7
import com .google .gson .JsonObject ;
9
8
import dlt .client .tangle .hornet .enums .TransactionType ;
@@ -188,8 +187,12 @@ public void requestDataFromRandomDevice() {
188
187
* @throws InterruptedException
189
188
*/
190
189
private void publishNodeServices (String serviceType , String target ) {
191
- /* Só responde se tiver pelo menos um dispositivo conectado ao nó. */
192
- if (this .amountDevices > 0 ) {
190
+ /* Só responde se tiver pelo menos um dispositivo conectado ao nó, e não
191
+ seja um nó do tipo Egoísta. */
192
+ if (
193
+ this .amountDevices > 0 &&
194
+ !this .getNodeType ().getType ().toString ().equals ("SELFISH" )
195
+ ) {
193
196
logger .info ("Requested service type: " + serviceType );
194
197
195
198
Transaction transaction = null ;
You can’t perform that action at this time.
0 commit comments