upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/headers.h
diff options
context:
space:
mode:
authorVictorio Nascimento <155357371+Vic-Nas@users.noreply.github.com>2026-07-27 16:45:28 -0400
committerGitHub <noreply@github.com>2026-07-27 17:45:28 -0300
commit6ca1a1d6799474f8ca977b93ab630af7ace879c2 (patch)
treea0312ebc10fc6a56742d0e5caa85c31eb6d3eaa7 /src/headers.h
parent56df9830d5a002ff9ce3fac47e497673f8159e39 (diff)
Add Linux GUI installer via Wine (#3)
* Add Linux GUI installer via Wine * Fix launcher creation and add BTF_RELAY env var support * Pool server, Linux GUI, unified binary, README update * Root Makefile: make linux / make windows, cleaner README * Remove headless.cpp * Fix XPM color count mismatch causing toolbar image errors on Linux * XPM icons: same code on Windows and Linux, no ifdefs around image loading * Fix GTK icon crash and Linux printf format * btfrv: 10s socket timeout on relay connects * Faster peer discovery: more dials per pass, shorter backoff and sleep * Parallel btf peer connections * Fix GetMyExternalIP - was disabled, now uses modern IP echo services * Fix tunnel disconnect on idle and restore external IP detection * Filter stale Nostr descriptors * Sort peers by freshness, fresh first * Pool: add .btf Stratum listener — miners connect via rendezvous, no port forwarding needed * btf pool: self-replacing listeners, one per relay, no queuing between miners * Mining modes: solo/operator/participant — pool server on-demand, participant Stratum client * Status bar: show external IP and .btf address * README: clean rewrite, concept-first, minimal * make linux produces AppImage * make linux produces AppImage * Pool dashboard: connect instructions, tabs, share bars * Perf fixes: GetMyExternalIP threaded, btf listener counted * Perf fixes: GetMyExternalIP threaded, btf listener counted * Fix pool payouts: defer until coinbase maturity * Pool: clean mode switching, IP warning * Pool: clean mode switching * Fix gPoolRunning: remove static * AppImage: use real icon from bitcoin.ico * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Windows build: use mingw32-make * Windows build: simpler make invocation * Add deps-windows target * Windows build fixes * Windows build fixes * Windows makefile: fix obj dir * Windows: output to repo root * Windows: bundle DLLs into zip * Replace wxWidgets with ImGui+GLFW: same build on Linux and Windows * Fix %I64d that slipped back through rebase (main.h, net.h) * MinGW: add _mkdir shim for non-MSVC Windows; fix %I64d * Fix gPoolRunning extern outside ifndef _WIN32 * Remove -lboost_system: boost is header-only in this codebase * Status bar: copy buttons for IP and .btf address * Windows: add app icon via windres, strip wx stuff from rc file * Clean GUI: single Options menu item, bigger font, better spacing, cleaner options dialog; update README * GUI: embed Roboto font at 16px for clear readability on all platforms * Windows: windres depends on obj dir target * Fix balance hidden off-screen: put on own line below address bar * Windows: inline mkdir in every rule, remove dir target that confused make * Windows: move all target to top so it's the default rule * Fix pool server not starting: always start when operator selected, re-sync dialog state on open * Write debug.log to data directory (AppData/Roaming/Bitflash on Windows) * Participant miner: use wallet address as username so payouts go to wallet * Add .gitattributes to lock LF line endings, prevent CRLF drift * Refactor pool mining to btf-only transport * Persist pool settings and startup wiring * Prune stale peers and expose pool queries * Fix build regressions and add CLI mode/arg parity * Fix rpc miner stats declaration order * Centralize pool runtime extern declarations * Separate operator/participant dashboards and restore peer stats * Add live telemetry strip and clearer per-mode runtime metrics * Reduce mining dashboard clutter and remove manual pool entry * Count only authorized pool miners * Seed initial pool job on startup * Use a real share target for pool work * Switch pool accounting to round-based shares * Fix nostr pool announcer stats call sites * Fix pool stats definition order * Improve pool worker status display * Add mutex include for participant status * Replace ImClamp in dashboard layout * Clarify participant work status * Log participant status transitions * Reduce peer discovery log noise * Add participant status badge * Track participant auth acknowledgements * Log and validate pool job delivery --------- Co-authored-by: Bitflash Pool Dev <pool@bitflash>
Diffstat (limited to 'src/headers.h')
-rw-r--r--src/headers.h115
1 files changed, 4 insertions, 111 deletions
diff --git a/src/headers.h b/src/headers.h
index e253803..bb252c7 100644
--- a/src/headers.h
+++ b/src/headers.h
@@ -1,111 +1,4 @@
1// Copyright (c) 2009 Satoshi Nakamoto 1// Bitflash — main include file.
2// Distributed under the MIT/X11 software license, see the accompanying 2// Includes core node headers. GUI is handled separately in gui.cpp.
3// file license.txt or http://www.opensource.org/licenses/mit-license.php. 3#pragma once
4 4#include "headers_core.h"
5#ifdef _MSC_VER
6#pragma warning(disable:4786)
7#pragma warning(disable:4804)
8#pragma warning(disable:4717)
9#endif
10
11#ifdef _WIN32
12// ---- Windows build (GUI wallet + miner) ----
13#ifdef _WIN32_WINNT
14#undef _WIN32_WINNT
15#endif
16#define _WIN32_WINNT 0x0601
17#define WIN32_LEAN_AND_MEAN 1
18// winsock2.h must come before windows.h/wx to avoid pulling in winsock 1
19#include <winsock2.h>
20#include <ws2tcpip.h>
21#include <mswsock.h>
22#include <wx/wx.h>
23#include <wx/clipbrd.h>
24#include <wx/snglinst.h>
25#include <openssl/ecdsa.h>
26#include <openssl/evp.h>
27#include <openssl/rand.h>
28#include <openssl/sha.h>
29#include <openssl/ripemd.h>
30#include <windows.h>
31#include <stdio.h>
32#include <stdlib.h>
33#include <io.h>
34#include <direct.h>
35#include <math.h>
36#include <limits.h>
37#include <float.h>
38#include <assert.h>
39#include <process.h>
40#include <malloc.h>
41#include <memory>
42#else
43// ---- Linux/POSIX headless build (bitflash-node) ----
44#include "compat.h"
45#include <openssl/ecdsa.h>
46#include <openssl/evp.h>
47#include <openssl/rand.h>
48#include <openssl/sha.h>
49#include <openssl/ripemd.h>
50#include <stdio.h>
51#include <stdlib.h>
52#include <math.h>
53#include <limits.h>
54#include <float.h>
55#include <assert.h>
56#include <memory>
57#endif
58#define BOUNDSCHECK 1
59#include <sstream>
60#include <string>
61#include <vector>
62#include <list>
63#include <deque>
64#include <map>
65#include <set>
66#include <algorithm>
67#include <numeric>
68#include <array>
69#include <boost/foreach.hpp>
70#pragma hdrstop
71using namespace std;
72
73// In 2009 windows.h provided min/max macros accepting mixed types; wxWidgets 3
74// defines NOMINMAX, so we restore mixed-type versions here. For matching types,
75// std::min/std::max remain preferred during overload resolution.
76template<typename T1, typename T2>
77inline typename std::common_type<T1, T2>::type min(const T1& a, const T2& b)
78{
79 return (a < b) ? a : b;
80}
81template<typename T1, typename T2>
82inline typename std::common_type<T1, T2>::type max(const T1& a, const T2& b)
83{
84 return (a > b) ? a : b;
85}
86
87
88
89#include "serialize.h"
90#include "uint256.h"
91#include "util.h"
92#include "key.h"
93#include "bignum.h"
94#include "base58.h"
95#include "script.h"
96#include "db.h"
97#include "net.h"
98#include "irc.h"
99#include "nostr.h"
100#include "randomx_pow.h"
101#include "main.h"
102#include "market.h"
103#ifdef _WIN32
104#include "uibase.h"
105#include "ui.h"
106#else
107// Headless build has no GUI; the core only calls a couple of UI helpers,
108// provided by headless.cpp (a no-op repaint and a timestamp formatter).
109void MainFrameRepaint();
110string DateTimeStr(int64 nTime);
111#endif