Changed the 'updateNode' to make it also add a new node if it was not present
This commit is contained in:
parent
71896ad65b
commit
dc348b2578
1 changed files with 2 additions and 5 deletions
|
@ -25,11 +25,8 @@ public class LatencyNodeProvider implements NodeProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean updateNode(FullNode fullNode) {
|
public boolean updateNode(FullNode fullNode) {
|
||||||
boolean existed = mFullNodeHeap.remove(fullNode);
|
mFullNodeHeap.remove(fullNode);
|
||||||
if(existed){
|
return mFullNodeHeap.offer(fullNode);
|
||||||
return mFullNodeHeap.offer(fullNode);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue