The % dominance stats now update along with the manual hashrate.
The updating UI blocks were also moved so all the updating stats
are close to each other.
There's not much interesting data I could display that regular
Monero GUI or a block explorer can't do, so I'm scrapping the
[Monero] tab. Maybe it'll come back if I rewrite [Status] to include
graphs (never).
The [P2Pool] submenu is pretty much done, this changed the spacing
to make the logs larger and so all the elements fit correctly.
Instead of saving P2Pool payout logs as they are, they are now
(de)serialized in the same [Display] format, e.g:
<DATE> <TIME> | <12_DOT_FLOAT> XMR | Block <BLOCK>
2022-09-31 12:53:52.8683 | 0.166122683521 XMR | Block 2,713,512
The parsing functions were updated to be able to read both raw
log lines and the new above format.
When Gupax can't read disk files at startup, it will [Error],
with an option to reset the state file, the user is given two
options [Yes] or [No].
Gupax's global error screen system ignores new errors from
overriding the current IF the current is a [Panic]. This makes
sure the worst errors stay on screen.
This also means after clicking [Yes], it will get ignored and the
screen won't change. So, allow for certain buttons to pass through.
I should probably re-make this whole global error screen system,
it's pretty much a global variable anyone can mutate randomly.
General cleanup and optimizations. Some functions are fixed,
some were turned into [const fn], and other small stuff like
[AtomicUnit] using a [u64] instead of a [u128]
Writing [a.lock().unwrap().b.lock().unwrap()] sucks, so these are
some macros that are for common situations. This commit also has
a [sed] replace on all previous code that _could_ have been a macro,
which they all are now.
Hopefully nothing breaks :D
user_p2pool_percent = The percent of hashrate the user accounts for
relative to all of P2Pool's hashrate.
user_monero_percent = The percent of hashrate the user accounts for
relative to all of Monero's hashrate.
This adds all necessary functions/conversions/serde/tests for the
new APIs. It also includes the actual reads inside the watchdog loop.
Every loop, [tick] will increment by 1. At [60], the watchdog
will attempt to read and parse the [network] & [pool] APIs.
Since the loop is [900ms], this means this will occur around
every 54 seconds. [tick] gets reset upon successful read/parsing.
Instead of a single "true" filename when walking dirs searching
for the newly downloaded (Gupax|P2Pool|XMRig), allow for multiple
valid names as long as they _seem_ correct AND are files, e.g:
GUPAX|Gupax|gupax (.exe)
P2POOL|P2Pool|P2pool|p2pool (.exe)
XMRIG|XMRig|Xmrig|xmrig (.exe)
If the packaging naming schemes change for any of these,
the update code will be able to actually handle it.
These couldn't be fit in before since there wasn't enough space.
They still can't all fit in, but the most important ones can be
after adjusting the font sizes and height spacing.
If the user fullscreens, restricting to the 4:3 aspect ratio
doesn't make sense, so change the test for only the default/min.
Max is 4k since... who owns 8k monitors :D
macOS moves "dangerous" applications into a read-only [/private]
filesystem. This messes up with the updater and default P2Pool and
XMRig paths.
If [/private] is detected, show a panic screen upon Gupax startup
telling the user to move it to [/Applications]. This _seems_ to
make macOS relax a little (after an arbitrary amount of time...)