From 7a2464cdcb553c5f2cae6347ada2c9305d674654 Mon Sep 17 00:00:00 2001 From: hayzamjs Date: Wed, 8 Jan 2020 10:58:56 +0000 Subject: [PATCH 1/3] Simple way to stop IPFS instance on quitting RPC --- src-electron/main-process/modules/wallet-rpc.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src-electron/main-process/modules/wallet-rpc.js b/src-electron/main-process/modules/wallet-rpc.js index ef08aee..a9078e4 100644 --- a/src-electron/main-process/modules/wallet-rpc.js +++ b/src-electron/main-process/modules/wallet-rpc.js @@ -1685,6 +1685,12 @@ export class WalletRPC { } quit () { + //Simple way to gracefully stop IPFS on exit + http.get('http://localhost:5001/api/v0/shutdown', (resp) => { + }).on("error", (err) => { + console.log("Error: " + err.message); + }) + return new Promise((resolve, reject) => { if (this.walletRPCProcess) { this.closeWallet().then(() => { From ce7868dc855f30bd29550d1690456397a9d46db9 Mon Sep 17 00:00:00 2001 From: hayzamjs Date: Wed, 8 Jan 2020 21:28:17 +0000 Subject: [PATCH 2/3] Add 5 min block time --- src-electron/main-process/modules/daemon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-electron/main-process/modules/daemon.js b/src-electron/main-process/modules/daemon.js index 4682102..9cc7d2d 100644 --- a/src-electron/main-process/modules/daemon.js +++ b/src-electron/main-process/modules/daemon.js @@ -21,8 +21,8 @@ export class Daemon { // Settings for timestamp to height conversion // These are initial values used to calculate the height this.PIVOT_BLOCK_HEIGHT = 119681 - this.PIVOT_BLOCK_TIMESTAMP = 1539676273 - this.PIVOT_BLOCK_TIME = 120 + this.PIVOT_BLOCK_TIMESTAMP = 1523976903 + this.PIVOT_BLOCK_TIME = 300 } checkVersion () { From 37c7ebf009c8862471c7d1cab8374f145493cd83 Mon Sep 17 00:00:00 2001 From: hayzamjs Date: Wed, 8 Jan 2020 21:43:59 +0000 Subject: [PATCH 3/3] Increment version --- package.json | 2 +- src-electron/main-process/modules/backend.js | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 40835ed..21e984d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scala-electron-wallet", - "version": "1.4.0", + "version": "1.5.0", "description": "Modern GUI interface for Scala Currency", "productName": "Scala Electron Wallet", "cordovaId": "com.scalanetwork.wallet", diff --git a/src-electron/main-process/modules/backend.js b/src-electron/main-process/modules/backend.js index 03b7bf8..7fe9c20 100644 --- a/src-electron/main-process/modules/backend.js +++ b/src-electron/main-process/modules/backend.js @@ -108,12 +108,8 @@ export class Backend { port: "20189" }, { - host: "daemons.cryptopool.space", + host: "xlanode.com", port: "20189" - }, - { - host: "nodes.hashvault.pro", - port: "22023" } ]