mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-18 13:22:42 +01:00
PeerMonitor: Simplify a switch-case.
This commit is contained in:
parent
f67f47a71c
commit
39bb7faafb
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user