PeerMonitor: Simplify a switch-case.

This commit is contained in:
Andreas Schildbach 2021-04-22 15:59:09 +02:00
parent f67f47a71c
commit 39bb7faafb

View File

@ -220,8 +220,9 @@ public class PeerMonitor {
case CHAIN_HEIGHT:
return peer.getBestHeight();
case PING_TIME:
return peer.getPingTime();
case LAST_PING_TIME:
return col == PING_TIME ? peer.getPingTime() : peer.getLastPingTime();
return peer.getLastPingTime();
default: throw new RuntimeException();
}