Changed the 'updateNode' to make it also add a new node if it was not present

develop
Nelson R. Perez 2019-09-25 17:31:54 -05:00
parent 71896ad65b
commit dc348b2578
1 changed files with 2 additions and 5 deletions

View File

@ -25,12 +25,9 @@ public class LatencyNodeProvider implements NodeProvider {
@Override
public boolean updateNode(FullNode fullNode) {
boolean existed = mFullNodeHeap.remove(fullNode);
if(existed){
mFullNodeHeap.remove(fullNode);
return mFullNodeHeap.offer(fullNode);
}
return false;
}
/**
* Updates an existing node with the new latency value.