Merge branch 'develop' of github.com:Agorise/graphenej into develop
This commit is contained in:
commit
954cf3e16d
3 changed files with 4 additions and 4 deletions
|
@ -22,6 +22,6 @@ buildscript {
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -191,7 +191,7 @@ public class NetworkService extends Service {
|
||||||
// Property used to keep track of the currently active node
|
// Property used to keep track of the currently active node
|
||||||
private FullNode mSelectedNode;
|
private FullNode mSelectedNode;
|
||||||
|
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
private Gson gson = new GsonBuilder()
|
private Gson gson = new GsonBuilder()
|
||||||
.registerTypeAdapter(Transaction.class, new Transaction.TransactionDeserializer())
|
.registerTypeAdapter(Transaction.class, new Transaction.TransactionDeserializer())
|
||||||
|
@ -736,8 +736,7 @@ public class NetworkService extends Service {
|
||||||
Log.e(TAG, "Giving up on connections");
|
Log.e(TAG, "Giving up on connections");
|
||||||
stopSelf();
|
stopSelf();
|
||||||
} else {
|
} else {
|
||||||
Handler handler = new Handler(Looper.getMainLooper());
|
mHandler.postDelayed(new Runnable() {
|
||||||
handler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.d(TAG, "Retrying");
|
Log.d(TAG, "Retrying");
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class LatencyNodeProvider implements NodeProvider {
|
||||||
public boolean updateNode(FullNode fullNode, int latency){
|
public boolean updateNode(FullNode fullNode, int latency){
|
||||||
boolean existed = mFullNodeHeap.remove(fullNode);
|
boolean existed = mFullNodeHeap.remove(fullNode);
|
||||||
if(existed){
|
if(existed){
|
||||||
|
fullNode.addLatencyValue(latency);
|
||||||
return mFullNodeHeap.add(fullNode);
|
return mFullNodeHeap.add(fullNode);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue