Merge branch 'develop' of github.com:Agorise/graphenej into develop

This commit is contained in:
Severiano Jaramillo 2019-02-14 20:13:31 -06:00
commit 1004873d98
2 changed files with 3 additions and 3 deletions

View file

@ -191,7 +191,7 @@ public class NetworkService extends Service {
// Property used to keep track of the currently active node
private FullNode mSelectedNode;
private Handler mHandler = new Handler();
private Handler mHandler = new Handler(Looper.getMainLooper());
private Gson gson = new GsonBuilder()
.registerTypeAdapter(Transaction.class, new Transaction.TransactionDeserializer())
@ -736,8 +736,7 @@ public class NetworkService extends Service {
Log.e(TAG, "Giving up on connections");
stopSelf();
} else {
Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(new Runnable() {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
Log.d(TAG, "Retrying");

View file

@ -42,6 +42,7 @@ public class LatencyNodeProvider implements NodeProvider {
public boolean updateNode(FullNode fullNode, int latency){
boolean existed = mFullNodeHeap.remove(fullNode);
if(existed){
fullNode.addLatencyValue(latency);
return mFullNodeHeap.add(fullNode);
}
return false;