Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Pruning Command Line Flags #1869

Merged
merged 19 commits into from
Aug 22, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pantheon/src/main/java/tech/pegasys/pantheon/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public class Runner implements AutoCloseable {
public void start() {
try {
LOG.info("Starting Ethereum main loop ... ");
if (natManager.isPresent()) {
RatanRSur marked this conversation as resolved.
Show resolved Hide resolved
natManager.get().start();
}
natManager.ifPresent(UpnpNatManager::start);
RatanRSur marked this conversation as resolved.
Show resolved Hide resolved
networkRunner.start();
if (networkRunner.getNetwork().isP2pEnabled()) {
pantheonController.getSynchronizer().start();
Expand Down Expand Up @@ -126,9 +124,7 @@ public void close() throws Exception {
websocketRpc.ifPresent(service -> waitForServiceToStop("websocketRpc", service.stop()));
metrics.ifPresent(service -> waitForServiceToStop("metrics", service.stop()));

if (natManager.isPresent()) {
natManager.get().stop();
}
natManager.ifPresent(UpnpNatManager::stop);
} finally {
try {
vertx.close();
Expand Down