Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for running daemon before attempting to download? #892

Closed
dasource opened this issue Mar 12, 2018 · 3 comments
Closed

Check for running daemon before attempting to download? #892

dasource opened this issue Mar 12, 2018 · 3 comments
Labels
type: Feature Request make a case for a change to a particular feature or a new feature to be added

Comments

@dasource
Copy link
Member

If a daemon is already running, no need to download and try to start one.

`
user@dasource:~/Downloads/particl-desktop-1.1.0-linux-x64$ ./particl-desktop
[09:32:42.695] [debug] console log level: silly
[09:32:42.724] [debug] file log level: debug
[09:32:43.123] [debug] app ready
[09:32:43.388] [info] Initializing...
[09:32:43.390] [info] Resolving path to client binary ...
[09:32:43.391] [debug] Platform: linux
[09:32:43.391] [info] Client binary path: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:32:43.392] [info] Checking for new client binaries config from: https://raw.githubusercontent.com/particl/particl-desktop/develop/modules/clientBinaries/clientBinaries.json
[09:32:43.393] [debug] Status: loadConfig - Fetching remote client config
[09:32:43.857] [debug] Status: loadConfig - Fetching local config
[09:32:44.320] [info] No "skippedNodeVersion.json" found.
[09:32:44.323] [debug] New client binaries config found, asking user if they wish to update...
[09:32:44.323] [debug] skipping ask user because Electron is not yet linked for that
[09:32:44.323] [info] Write new client binaries local config to disk ...
[09:32:44.326] [debug] Status: scanning - Scanning for binaries
[09:32:44.327] [info] Initializing Manager...
[09:32:44.328] [info] Resolving platform...
[09:32:44.328] [info] Calculating possible clients...
[09:32:44.330] [info] 1 possible clients.
[09:32:44.330] [info] Verifying status of all 1 possible clients...
[09:32:44.331] [info] Verify particld status ...
[09:32:44.332] [debug] particld binary name: particld
[09:32:44.332] [debug] Exec: "which particld"
[09:32:44.362] [debug] Command particld not found in path.
[09:32:44.363] [debug] Checking for particld binary in /home/user/.config/Particl Desktop/particld/unpacked ...
[09:32:44.402] [debug] Got optional folder binary for particld: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:32:44.403] [debug] Running particld sanity check for binary: /home/user/.config/Particl Desktop/particld/unpacked/particld ...
[09:32:44.403] [debug] particld binary path: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:32:44.403] [info] Checking for particld sanity check ...
[09:32:44.404] [info] Checking sanity for particld ...
[09:32:44.404] [debug] Exec: "/home/user/.config/Particl Desktop/particld/unpacked/particld -version"
[09:32:49.886] [debug] Sanity check output: Particl Core Daemon version v0.15.1.1.0-c740af6
Copyright (C) 2017 The Particl Core developers
Copyright (C) 2009-2017 The Bitcoin Core developers

Please contribute if you find Particl Core useful. Visit https://particl.io/
for further information about the software.
The source code is available from https://github.com/particl/particl-core.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or https://opensource.org/licenses/MIT

This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit https://www.openssl.org and cryptographic software written by
Eric Young and UPnP software written by Thomas Bernard.

[09:32:49.886] [error] Sanity check failed for particld Error: Unable to find "0.15.1.2" in particld output
at Promise.resolve.then.then.then (/home/user/Downloads/particl-desktop-1.1.0-linux-x64/resources/app.asar/modules/clientBinaries/clientBinariesManager.js:597:17)
at

[09:32:49.887] [debug] Sanity check failed for: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:32:49.888] [debug] particld deemed unavailable
[09:32:49.889] [debug] Status: downloading - Downloading binaries
[09:32:49.892] [info] Download binary for particld ...
[09:32:49.893] [debug] Generating download folder path ...
[09:32:49.894] [debug] Ensure download folder /home/user/.config/Particl Desktop/particld exists ...
[09:32:49.894] [info] Downloading package from https://github.com/particl/particl-core/releases/download/v0.15.1.2/particl-0.15.1.2-x86_64-linux-gnu.tar.gz to /home/user/.config/Particl Desktop/particld/archive.tar ...
████████████████████████████████████████ 100% | ETA: 1s | 29016604/29016604
[09:32:57.847] [debug] Downloaded https://github.com/particl/particl-core/releases/download/v0.15.1.2/particl-0.15.1.2-x86_64-linux-gnu.tar.gz to /home/user/.config/Particl Desktop/particld/archive.tar
[09:32:58.420] [error] sha256
[09:32:58.420] [error] 4771991be144657f7aa9922ff321ae267d5cf1aef91e15d19693b8688572a0a9
[09:32:58.420] [error] 4771991be144657f7aa9922ff321ae267d5cf1aef91e15d19693b8688572a0a9
[09:32:58.421] [debug] Ensure unpack folder /home/user/.config/Particl Desktop/particld/unpacked exists ...
[09:32:58.422] [debug] Unzipping /home/user/.config/Particl Desktop/particld/archive.tar to /home/user/.config/Particl Desktop/particld/unpacked ...
[09:32:58.423] [debug] Using tar ...
[09:32:58.423] [debug] Exec: "tar -xf /home/user/.config/Particl Desktop/particld/archive.tar -C /home/user/.config/Particl Desktop/particld/unpacked"
[09:33:07.145] [debug] Unzipped /home/user/.config/Particl Desktop/particld/archive.tar to /home/user/.config/Particl Desktop/particld/unpacked
[09:33:07.189] [info] Verify particld status ...
[09:33:07.190] [debug] particld binary name: particld
[09:33:07.190] [debug] Exec: "which particld"
[09:33:07.224] [debug] Command particld not found in path.
[09:33:07.226] [debug] Checking for particld binary in /home/user/.config/Particl Desktop/particld/unpacked ...
[09:33:07.226] [debug] Got optional folder binary for particld: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:33:07.227] [debug] Running particld sanity check for binary: /home/user/.config/Particl Desktop/particld/unpacked/particld ...
[09:33:07.227] [debug] particld binary path: /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:33:07.227] [info] Checking for particld sanity check ...
[09:33:07.228] [info] Checking sanity for particld ...
[09:33:07.228] [debug] Exec: "/home/user/.config/Particl Desktop/particld/unpacked/particld -version"
[09:33:07.278] [debug] Sanity check output: Particl Core Daemon version v0.15.1.2.0-8f1b307
Copyright (C) 2017-2018 The Particl Core developers
Copyright (C) 2009-2018 The Bitcoin Core developers

Please contribute if you find Particl Core useful. Visit https://particl.io/
for further information about the software.
The source code is available from https://github.com/particl/particl-core.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or https://opensource.org/licenses/MIT

This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit https://www.openssl.org and cryptographic software written by
Eric Young and UPnP software written by Thomas Bernard.

[09:33:07.278] [debug] Sanity check passed for /home/user/.config/Particl Desktop/particld/unpacked/particld
[09:33:07.282] [debug] Status: filtering - Filtering available clients
[09:33:07.284] [debug] Status: done - undefined
[09:33:07.284] [info] daemonManager returned successfully, starting daemon!
[09:33:15.046] [info] daemon already started
`

@HenkSwardt
Copy link
Contributor

@kewde

Can we please have a look at this issue logged by @dasource . How long do you think making a change like this will take?

Thank you

@zaSmilingIdiot zaSmilingIdiot added Priority: Medium type: Feature Request make a case for a change to a particular feature or a new feature to be added labels Nov 11, 2019
@zaSmilingIdiot
Copy link
Collaborator

zaSmilingIdiot commented Nov 11, 2019

The particl-desktop application still attempts to first determine whether a particl-core executable file exists, and only once its verified the existence of such a file, performs a check for a running daemon (connecting to it or otherwise starting the daemon).

This startup functionality needs to be adjusted to first check for a daemon before checking for the existence of the particl-core file, in order to implement this requested change.

@zaSmilingIdiot
Copy link
Collaborator

Just noting that this issue was closed automatically as an update has been applied that will be available in the next release.

The application now first checks for a running daemon. If that is not found, then only a check is performed to determine the availability of a valid particl-core binary. If that exists, attempt to start it, otherwise attempt to download a valid binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Feature Request make a case for a change to a particular feature or a new feature to be added
Projects
None yet
Development

No branches or pull requests

4 participants