private static void shutdown() { try { if (peers == null) return; // setup() never called so nothing to do. peers.stopAndWait(); saveWallet(walletFile); store.close(); wallet = null; } catch (BlockStoreException e) { throw new RuntimeException(e); } }