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

This commit is contained in:
Nelson R. Perez 2019-09-25 17:31:54 -05:00
parent 71896ad65b
commit dc348b2578

View file

@ -25,11 +25,8 @@ public class LatencyNodeProvider implements NodeProvider {
@Override
public boolean updateNode(FullNode fullNode) {
boolean existed = mFullNodeHeap.remove(fullNode);
if(existed){
return mFullNodeHeap.offer(fullNode);
}
return false;
mFullNodeHeap.remove(fullNode);
return mFullNodeHeap.offer(fullNode);
}
/**