Compare commits

...

5 Commits

Author SHA1 Message Date
sami7777 61f22fcfd4 Fix display version string to match 5.3.2
Build All Platforms / build-windows-qt (push) Waiting to run
Build All Platforms / build-windows-daemon (push) Waiting to run
Build All Platforms / build-linux-qt (push) Waiting to run
Build All Platforms / build-linux-daemon (push) Waiting to run
Build All Platforms / build-macos (push) Waiting to run
Build All Platforms / release (push) Blocked by required conditions
DISPLAY_VERSION_REVISION in version.h was still set to 1, causing the
internal version string to show v5.3.1.0 instead of v5.3.2.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:52:44 -07:00
sami7777 bf1bf393c8 Bump version to 5.3.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:18:06 -07:00
sami7777 39e244a11c Fix build: random_shuffle removal, Windows daemon missing objects
- Replace random_shuffle (removed in C++17) with std::shuffle in wallet.cpp
- Add -std=c++17 to makefile.mingw (Windows daemon was missing it)
- Add lz4.o, tor_embed_hooks.o, tor_embedded.o to makefile.mingw OBJS
- Add build rules for new objects in makefile.mingw
- Simplify Tor embedded build to use aggregate libtor.a

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:47:42 -07:00
sami7777 6724dfc832 Fix build: revert shared_ptr in RPC, replace auto_ptr with unique_ptr
- trianglesrpc.cpp: revert std::shared_ptr back to boost::shared_ptr
  (boost::signals2::slot::track() requires boost::shared_ptr)
- miner.cpp: auto_ptr → unique_ptr (auto_ptr removed in C++17,
  caught by macOS clang)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:34:16 -07:00
sami7777 9dadba6b09 Fix build: tuple access syntax, namespace, LZ4 separate compilation
- miner.cpp: .get<N>() → std::get<N>() (boost::tuple member syntax
  doesn't exist on std::tuple)
- script.cpp: remove 'using namespace boost' (no boost headers left)
- smessage.cpp: include lz4/lz4.h instead of lz4/lz4.c (U64 typedef
  conflict with xxhash when LZ4 1.10.0 source included in same TU)
- makefile.unix: add obj/lz4.o as separate compilation unit
- triangles-qt.pro: add src/lz4/lz4.c to SOURCES

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 02:46:37 -07:00
12 changed files with 95 additions and 61 deletions
+21 -26
View File
@@ -11,7 +11,7 @@ trianglesd / triangles-qt
├── tor_embedded.cpp ← calls tor_run_main() in a background thread ├── tor_embedded.cpp ← calls tor_run_main() in a background thread
├── tor_process.cpp ← fallback: launches external tor binary (already works) ├── tor_process.cpp ← fallback: launches external tor binary (already works)
├── onion_v3.cpp ← V3 onion address generation / SOCKS5 proxy logic ├── onion_v3.cpp ← V3 onion address generation / SOCKS5 proxy logic
└── libtor.a ← static Tor library (built from official source) └── libtor.a ← aggregate static Tor library (built from official source)
``` ```
When compiled with `ENABLE_TOR_EMBEDDED`, the wallet calls `tor_run_main()` from When compiled with `ENABLE_TOR_EMBEDDED`, the wallet calls `tor_run_main()` from
@@ -34,7 +34,7 @@ This puts the full Tor source at `src/tor/tor-src/`.
Current imported checkout in this repo: `release-0.4.9` at commit `1442ca4`. Current imported checkout in this repo: `release-0.4.9` at commit `1442ca4`.
There is also a helper build script at `src/tor/build-libtor.sh`. There is also a helper build script at `src/tor/build-libtor.sh`.
## Step 2: Build libtor.a (Linux) ## Step 2: Build libtor.a
Tor uses autotools. Build it as a static library: Tor uses autotools. Build it as a static library:
@@ -71,10 +71,9 @@ Or from the repo root:
./src/tor/build-libtor.sh ./src/tor/build-libtor.sh
``` ```
After building, the static libraries are in `src/tor/tor-src/src/`: After building, the static libraries are in `src/tor/tor-src/`:
- `src/core/libtor-app.a` - `libtor.a`
- `src/lib/libtor-*.a` (multiple component libs) - `src/lib/libtor-*.a` (multiple component libs)
- `src/trunnel/libor-trunnel.a`
The header `src/feature/api/tor_api.h` provides the public C API: The header `src/feature/api/tor_api.h` provides the public C API:
```c ```c
@@ -98,22 +97,14 @@ make -f makefile.unix \
``` ```
You may need to adjust the `-l` flags in the makefile depending on the exact You may need to adjust the `-l` flags in the makefile depending on the exact
library names Tor produces. Check `src/tor/tor-src/src/` after building: library names Tor produces. Check `src/tor/tor-src/` after building:
```bash ```bash
find tor/tor-src/src -name '*.a' | sort find tor/tor-src -name '*.a' | sort
``` ```
Common libraries to link (order matters): On the imported `release-0.4.9` checkout in this repo, the simplest working
``` link path is the aggregate `libtor.a` plus the normal dependency libraries.
-ltor-app -lor -lor-ctime -lor-evloop -lor-event -lor-compress
-lor-container -lor-crypt-ops -lor-encoding -lor-err -lor-fs
-lor-intmath -lor-lock -lor-log -lor-malloc -lor-math -lor-memarea
-lor-meminfo -lor-net -lor-osinfo -lor-process -lor-sandbox
-lor-smartlist-core -lor-string -lor-term -lor-thread -lor-time
-lor-tls -lor-trace -lor-version -lor-wallclock
-lor-trunnel
```
### Windows (triangles-qt.pro) ### Windows (triangles-qt.pro)
@@ -126,9 +117,14 @@ qmake "USE_TOR_EMBEDDED=1" \
Both build systems now default to: Both build systems now default to:
- source root: `src/tor/tor-src` - source root: `src/tor/tor-src`
- include path: `src/tor/tor-src/src/feature/api` - include path: `src/tor/tor-src/src/feature/api`
- library paths: `src/tor/tor-src/src/core`, `src/tor/tor-src/src/lib`, `src/tor/tor-src/src/trunnel` - library path: `src/tor/tor-src`
- embedded Tor library: `-ltor`
Override `TOR_EMBEDDED_LIBS` if the actual Tor static library names differ on your platform/build. On Windows, the imported Tor `0.4.9.5` build also needed:
- `-llzma`
- `-lzstd`
- `-liphlpapi`
- `-lshlwapi` (already linked by Triangles)
## Step 4: Wire into init.cpp ## Step 4: Wire into init.cpp
@@ -182,10 +178,9 @@ The embedded Tor respects these command-line flags:
src/tor/ src/tor/
├── tor-src/ ← git submodule (official Tor repo) ├── tor-src/ ← git submodule (official Tor repo)
│ └── src/ │ └── src/
│ ├── core/libtor-app.a │ ├── lib/libtor-*.a
│ ├── lib/libor-*.a
│ ├── trunnel/libor-trunnel.a
│ └── feature/api/tor_api.h │ └── feature/api/tor_api.h
│ └── libtor.a
├── tor_embedded.h ← CTorEmbedded class header ├── tor_embedded.h ← CTorEmbedded class header
├── tor_embedded.cpp ← implementation (calls tor_run_main) ├── tor_embedded.cpp ← implementation (calls tor_run_main)
├── tor_process.h ← external Tor process manager (fallback) ├── tor_process.h ← external Tor process manager (fallback)
@@ -213,11 +208,11 @@ object instead of raw `tor_main(int argc, char** argv)`.
**Tor fails to bootstrap**: Check firewall rules. Tor needs outbound TCP to the **Tor fails to bootstrap**: Check firewall rules. Tor needs outbound TCP to the
Tor network (ports 80, 443, 9001, 9030). Tor network (ports 80, 443, 9001, 9030).
**Link errors with libtor**: The Tor static libraries must be linked in **Link errors with libtor**: Prefer the aggregate `libtor.a` from the top level
dependency order. If you get undefined symbols, reorder the `-l` flags or use of the Tor build tree. On the imported Windows/MSYS2 build in this repo, the
`-Wl,--start-group ... -Wl,--end-group` to resolve circular deps: minimal verified link set was:
``` ```
LIBS += -Wl,--start-group -ltor-app -lor -lor-ctime ... -Wl,--end-group -ltor -levent -lssl -lcrypto -lz -llzma -lzstd -lws2_32 -liphlpapi -lshlwapi
``` ```
**OpenSSL version mismatch**: Both Tor and Triangles must link against the same **OpenSSL version mismatch**: Both Tor and Triangles must link against the same
+1 -1
View File
@@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and triangles-qt.rc's voodoo requires it // These need to be macros, as version.cpp's and triangles-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 5 #define CLIENT_VERSION_MAJOR 5
#define CLIENT_VERSION_MINOR 3 #define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0 #define CLIENT_VERSION_BUILD 0
// Converts the parameter X to a string after macro replacement on X has been performed. // Converts the parameter X to a string after macro replacement on X has been performed.
+26 -2
View File
@@ -74,7 +74,7 @@ HARDENING+=-D_FORTIFY_SOURCE=2
DEBUGFLAGS=-g DEBUGFLAGS=-g
xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ xCXXFLAGS=-O2 -std=c++17 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \
-Wno-deprecated-declarations -Wno-reserved-user-defined-literal \ -Wno-deprecated-declarations -Wno-reserved-user-defined-literal \
-Wa,-mbig-obj \ -Wa,-mbig-obj \
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
@@ -135,8 +135,11 @@ OBJS= \
obj/scrypt-x86.o \ obj/scrypt-x86.o \
obj/scrypt-x86_64.o \ obj/scrypt-x86_64.o \
obj/smessage.o \ obj/smessage.o \
obj/lz4.o \
obj/onion_v3.o \ obj/onion_v3.o \
obj/tor_process.o obj/tor_process.o \
obj/tor_embed_hooks.o \
obj/tor_embedded.o
all: trianglesd.exe all: trianglesd.exe
@@ -208,6 +211,27 @@ obj/tor_process.o: tor/tor_process.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
obj/lz4.o: lz4/lz4.c
$(CXX) -c $(xCXXFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
obj/tor_embed_hooks.o: tor_embed_hooks.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
obj/tor_embedded.o: tor/tor_embedded.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
obj/net_bootstrap.o: net_bootstrap.cpp obj/net_bootstrap.o: net_bootstrap.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+12 -4
View File
@@ -170,24 +170,25 @@ OBJS= \
obj/scrypt-x86.o \ obj/scrypt-x86.o \
obj/scrypt-x86_64.o \ obj/scrypt-x86_64.o \
obj/smessage.o \ obj/smessage.o \
obj/lz4.o \
obj/onion_v3.o \ obj/onion_v3.o \
obj/tor_process.o \ obj/tor_process.o \
obj/tor_embed_hooks.o \ obj/tor_embed_hooks.o \
obj/tor_embedded.o obj/tor_embedded.o
# Embedded Tor support (optional) # Embedded Tor support (optional)
# Build with: make -f makefile.unix USE_TOR_EMBEDDED=1 TOR_LIB_PATH=/path/to/libtor # Build with: make -f makefile.unix USE_TOR_EMBEDDED=1 TOR_SOURCE_ROOT=/path/to/tor-src
# Requires libtor.a built from official Tor source (see CODEX-TOR-GUIDE.md) # Requires libtor.a built from official Tor source (see CODEX-TOR-GUIDE.md)
TOR_SOURCE_ROOT ?= tor/tor-src TOR_SOURCE_ROOT ?= tor/tor-src
TOR_INCLUDE_PATH ?= $(TOR_SOURCE_ROOT)/src/feature/api TOR_INCLUDE_PATH ?= $(TOR_SOURCE_ROOT)/src/feature/api
TOR_LIB_PATH ?= $(TOR_SOURCE_ROOT)/src/core $(TOR_SOURCE_ROOT)/src/lib $(TOR_SOURCE_ROOT)/src/trunnel TOR_LIB_PATH ?= $(TOR_SOURCE_ROOT)
TOR_EMBEDDED_LIBS ?= -ltor-app -lor -lor-ctime -lor-event -lor-trunnel TOR_EMBEDDED_LIBS ?= -ltor
ifdef USE_TOR_EMBEDDED ifdef USE_TOR_EMBEDDED
DEFS += -DENABLE_TOR_EMBEDDED DEFS += -DENABLE_TOR_EMBEDDED
DEFS += $(addprefix -I,$(TOR_INCLUDE_PATH)) DEFS += $(addprefix -I,$(TOR_INCLUDE_PATH))
LIBS += $(addprefix -L,$(TOR_LIB_PATH)) LIBS += $(addprefix -L,$(TOR_LIB_PATH))
LIBS += -Wl,--start-group $(TOR_EMBEDDED_LIBS) -Wl,--end-group LIBS += -Wl,--start-group $(TOR_EMBEDDED_LIBS) -Wl,--end-group
LIBS += -levent -levent_pthreads -lssl -lcrypto -lz -lm -lpthread LIBS += -llzma -lzstd -lm -lpthread
endif endif
# ZMQ support (optional) # ZMQ support (optional)
@@ -243,6 +244,13 @@ obj/%.o: %.c
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
obj/lz4.o: lz4/lz4.c
$(CXX) -c $(xCXXFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//'\
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
obj/tor_embed_hooks.o: tor_embed_hooks.cpp obj/tor_embed_hooks.o: tor_embed_hooks.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+11 -11
View File
@@ -93,15 +93,15 @@ public:
{ {
if (byFee) if (byFee)
{ {
if (a.get<1>() == b.get<1>()) if (std::get<1>(a) == std::get<1>(b))
return a.get<0>() < b.get<0>(); return std::get<0>(a) < std::get<0>(b);
return a.get<1>() < b.get<1>(); return std::get<1>(a) < std::get<1>(b);
} }
else else
{ {
if (a.get<0>() == b.get<0>()) if (std::get<0>(a) == std::get<0>(b))
return a.get<1>() < b.get<1>(); return std::get<1>(a) < std::get<1>(b);
return a.get<0>() < b.get<0>(); return std::get<0>(a) < std::get<0>(b);
} }
} }
}; };
@@ -110,7 +110,7 @@ public:
CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees) CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees)
{ {
// Create new block // Create new block
auto_ptr<CBlock> pblock(new CBlock()); unique_ptr<CBlock> pblock(new CBlock());
if (!pblock.get()) if (!pblock.get())
return NULL; return NULL;
@@ -259,9 +259,9 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees)
while (!vecPriority.empty()) while (!vecPriority.empty())
{ {
// Take highest priority transaction off the priority queue: // Take highest priority transaction off the priority queue:
double dPriority = vecPriority.front().get<0>(); double dPriority = std::get<0>(vecPriority.front());
double dFeePerKb = vecPriority.front().get<1>(); double dFeePerKb = std::get<1>(vecPriority.front());
CTransaction& tx = *(vecPriority.front().get<2>()); CTransaction& tx = *(std::get<2>(vecPriority.front()));
std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer); std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer);
vecPriority.pop_back(); vecPriority.pop_back();
@@ -562,7 +562,7 @@ void StakeMiner(CWallet *pwallet)
// Create new block // Create new block
// //
int64_t nFees; int64_t nFees;
auto_ptr<CBlock> pblock(CreateNewBlock(pwallet, true, &nFees)); unique_ptr<CBlock> pblock(CreateNewBlock(pwallet, true, &nFees));
if (!pblock.get()) if (!pblock.get())
return; return;
-1
View File
@@ -6,7 +6,6 @@
#include <tuple> #include <tuple>
using namespace std; using namespace std;
using namespace boost;
#include "script.h" #include "script.h"
#include "keystore.h" #include "keystore.h"
+1 -1
View File
@@ -54,7 +54,7 @@ Notes:
#include "txdb.h" #include "txdb.h"
#include "lz4/lz4.c" #include "lz4/lz4.h"
#include "xxhash/xxhash.h" #include "xxhash/xxhash.h"
#include "xxhash/xxhash.c" #include "xxhash/xxhash.c"
+6 -4
View File
@@ -25,16 +25,18 @@ echo "Configuring Tor static library build from: $TOR_SRC_DIR"
--disable-manpage \ --disable-manpage \
--disable-html-manual \ --disable-html-manual \
--disable-unittests \ --disable-unittests \
--disable-tool-name-check --disable-tool-name-check \
--with-libevent-dir="${LIBEVENT_DIR:-/mingw64}" \
--with-openssl-dir="${OPENSSL_DIR:-/mingw64}" \
--with-zlib-dir="${ZLIB_DIR:-/mingw64}"
echo "Building Tor" echo "Building Tor"
make -j"${NPROC:-$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)}" make -j"${NPROC:-$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)}"
echo echo
echo "Build finished. Inspect these locations for static libraries:" echo "Build finished. Inspect these locations for static libraries:"
echo " $TOR_SRC_DIR/src/core" echo " $TOR_SRC_DIR"
echo " $TOR_SRC_DIR/src/lib" echo " $TOR_SRC_DIR/src/lib"
echo " $TOR_SRC_DIR/src/trunnel"
echo echo
echo "Suggested next step for Triangles:" echo "Suggested next step for Triangles:"
echo ' make -f src/makefile.unix USE_TOR_EMBEDDED=1' echo ' make -f src/makefile.unix USE_TOR_EMBEDDED=1 TOR_SOURCE_ROOT=src/tor/tor-src'
+5 -4
View File
@@ -24,6 +24,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/asio/ssl.hpp> #include <boost/asio/ssl.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include <boost/shared_ptr.hpp>
#include <memory> #include <memory>
#include <list> #include <list>
@@ -739,7 +740,7 @@ void ThreadRPCServer(void* parg)
// Forward declaration required for RPCListen // Forward declaration required for RPCListen
template <typename Protocol, typename SocketAcceptorService> template <typename Protocol, typename SocketAcceptorService>
static void RPCAcceptHandler(std::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
ssl::context& context, ssl::context& context,
bool fUseSSL, bool fUseSSL,
AcceptedConnection* conn, AcceptedConnection* conn,
@@ -749,7 +750,7 @@ static void RPCAcceptHandler(std::shared_ptr< basic_socket_acceptor<Protocol, So
* Sets up I/O resources to accept and handle a new connection. * Sets up I/O resources to accept and handle a new connection.
*/ */
template <typename Protocol, typename SocketAcceptorService> template <typename Protocol, typename SocketAcceptorService>
static void RPCListen(std::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
ssl::context& context, ssl::context& context,
const bool fUseSSL) const bool fUseSSL)
{ {
@@ -771,7 +772,7 @@ static void RPCListen(std::shared_ptr< basic_socket_acceptor<Protocol, SocketAcc
* Accept and handle incoming connection. * Accept and handle incoming connection.
*/ */
template <typename Protocol, typename SocketAcceptorService> template <typename Protocol, typename SocketAcceptorService>
static void RPCAcceptHandler(std::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
ssl::context& context, ssl::context& context,
const bool fUseSSL, const bool fUseSSL,
AcceptedConnection* conn, AcceptedConnection* conn,
@@ -874,7 +875,7 @@ void ThreadRPCServer2(void* parg)
asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any(); asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", GetDefaultRPCPort())); ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", GetDefaultRPCPort()));
boost::system::error_code v6_only_error; boost::system::error_code v6_only_error;
std::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(io_service)); boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(io_service));
boost::signals2::signal<void ()> StopRequests; boost::signals2::signal<void ()> StopRequests;
+1 -1
View File
@@ -53,7 +53,7 @@ static const int MEMPOOL_GD_VERSION = 60002;
#define DISPLAY_VERSION_MAJOR 5 #define DISPLAY_VERSION_MAJOR 5
#define DISPLAY_VERSION_MINOR 3 #define DISPLAY_VERSION_MINOR 3
#define DISPLAY_VERSION_REVISION 1 #define DISPLAY_VERSION_REVISION 2
#define DISPLAY_VERSION_BUILD 0 #define DISPLAY_VERSION_BUILD 0
#endif #endif
+2 -1
View File
@@ -14,6 +14,7 @@
#include "addressindex.h" #include "addressindex.h"
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <algorithm> #include <algorithm>
#include <random>
#include <deque> #include <deque>
using namespace std; using namespace std;
@@ -1477,7 +1478,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime,
vector<pair<int64_t, pair<const CWalletTx*,unsigned int> > > vValue; vector<pair<int64_t, pair<const CWalletTx*,unsigned int> > > vValue;
int64_t nTotalLower = 0; int64_t nTotalLower = 0;
random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); std::shuffle(vCoins.begin(), vCoins.end(), std::mt19937(GetRandInt(std::numeric_limits<int>::max())));
for (COutput output : vCoins) for (COutput output : vCoins)
{ {
+9 -5
View File
@@ -331,6 +331,7 @@ SOURCES += src/qt/triangles.cpp src/qt/trianglesgui.cpp \
src/version.cpp \ src/version.cpp \
src/sync.cpp \ src/sync.cpp \
src/smessage.cpp \ src/smessage.cpp \
src/lz4/lz4.c \
src/util.cpp \ src/util.cpp \
src/netbase.cpp \ src/netbase.cpp \
src/key.cpp \ src/key.cpp \
@@ -557,8 +558,7 @@ contains(USE_ZMQ, 1) {
# Embedded Tor support (optional) # Embedded Tor support (optional)
# Build with: # Build with:
# qmake "USE_TOR_EMBEDDED=1" "TOR_INCLUDE_PATH=src/tor/tor-src/src/feature/api" \ # qmake "USE_TOR_EMBEDDED=1" "TOR_SOURCE_ROOT=src/tor/tor-src"
# "TOR_LIB_PATH=src/tor/tor-src/src/core src/tor/tor-src/src/lib src/tor/tor-src/src/trunnel"
contains(USE_TOR_EMBEDDED, 1) { contains(USE_TOR_EMBEDDED, 1) {
message(Building with embedded Tor support) message(Building with embedded Tor support)
DEFINES += ENABLE_TOR_EMBEDDED DEFINES += ENABLE_TOR_EMBEDDED
@@ -572,7 +572,7 @@ contains(USE_TOR_EMBEDDED, 1) {
} }
isEmpty(TOR_LIB_PATH) { isEmpty(TOR_LIB_PATH) {
TOR_LIB_PATH = $$TOR_SOURCE_ROOT/src/core $$TOR_SOURCE_ROOT/src/lib $$TOR_SOURCE_ROOT/src/trunnel TOR_LIB_PATH = $$TOR_SOURCE_ROOT
} }
!isEmpty(TOR_INCLUDE_PATH) { !isEmpty(TOR_INCLUDE_PATH) {
@@ -583,10 +583,11 @@ contains(USE_TOR_EMBEDDED, 1) {
LIBS += -L$$path LIBS += -L$$path
} }
# Default static library set for Tor 0.4.8/0.4.9 style builds. # Default static library set for the imported Tor 0.4.9.x tree.
# A full upstream build emits a top-level libtor.a aggregator.
# Override with TOR_EMBEDDED_LIBS from the qmake command line if needed. # Override with TOR_EMBEDDED_LIBS from the qmake command line if needed.
isEmpty(TOR_EMBEDDED_LIBS) { isEmpty(TOR_EMBEDDED_LIBS) {
TOR_EMBEDDED_LIBS = -ltor-app -lor -lor-ctime -lor-event -lor-trunnel TOR_EMBEDDED_LIBS = -ltor
} }
unix { unix {
@@ -594,6 +595,9 @@ contains(USE_TOR_EMBEDDED, 1) {
} else { } else {
LIBS += $$TOR_EMBEDDED_LIBS LIBS += $$TOR_EMBEDDED_LIBS
} }
LIBS += -llzma -lzstd
windows:LIBS += -liphlpapi
} }
system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)