Modernize codebase: C++17, remove Tor v2, add embedded Tor scaffold, IBD speedups
- Replace ~290 BOOST_FOREACH with C++11 range-for across 41+ files - Replace boost::assign::map_list_of with C++11 brace initialization - Remove PAIRTYPE macro (no longer needed without BOOST_FOREACH) - Guard OpenSSL locking callbacks for 3.x (no-ops in >= 1.1.0) - Fix Qt deprecated APIs for Qt6 compat (QStyleOptionViewItemV4, setResizeMode) - Add openssl_compat.h version string wrapper - Enable C++17 in makefile.unix and triangles-qt.pro - Delete 163 dead Tor v2 source files (~150K lines removed) - Add embedded Tor scaffold (tor_embedded.h/cpp) using tor_api.h - Add build-libtor.sh helper and CODEX-TOR-GUIDE.md - Update makefile.unix and .pro with USE_TOR_EMBEDDED optional flag - Fallback to external tor_process when not compiled with libtor - IBD pipeline refill: 100 -> 1000 blocks - Send/recv buffer limits: unlimited -> 100MB/32MB - Orphan block cap: unlimited -> 750 with random eviction - Socket poll: 10ms -> 1ms during IBD - Message handler sleep: 10ms -> 1ms during IBD - Stall detection timeout: 5s -> 2s Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -61,7 +61,7 @@ int64_t CWalletDB::GetAccountCreditDebit(const string& strAccount)
|
||||
ListAccountCreditDebit(strAccount, entries);
|
||||
|
||||
int64_t nCreditDebit = 0;
|
||||
BOOST_FOREACH (const CAccountingEntry& entry, entries)
|
||||
for (const CAccountingEntry& entry : entries)
|
||||
nCreditDebit += entry.nCreditDebit;
|
||||
|
||||
return nCreditDebit;
|
||||
@@ -130,7 +130,7 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
}
|
||||
list<CAccountingEntry> acentries;
|
||||
ListAccountCreditDebit("", acentries);
|
||||
BOOST_FOREACH(CAccountingEntry& entry, acentries)
|
||||
for (CAccountingEntry& entry : acentries)
|
||||
{
|
||||
txByTime.insert(make_pair(entry.nTime, TxPair((CWalletTx*)0, &entry)));
|
||||
}
|
||||
@@ -157,7 +157,7 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
else
|
||||
{
|
||||
int64_t nOrderPosOff = 0;
|
||||
BOOST_FOREACH(const int64_t& nOffsetStart, nOrderPosOffsets)
|
||||
for (const int64_t& nOffsetStart : nOrderPosOffsets)
|
||||
{
|
||||
if (nOrderPos >= nOffsetStart)
|
||||
++nOrderPosOff;
|
||||
@@ -515,7 +515,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
pwallet->nTimeFirstKey = 1; // 0 would be considered 'no value'
|
||||
|
||||
|
||||
BOOST_FOREACH(uint256 hash, wss.vWalletUpgrade)
|
||||
for (uint256 hash : wss.vWalletUpgrade)
|
||||
WriteTx(hash, pwallet->mapWallet[hash]);
|
||||
|
||||
// Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc:
|
||||
@@ -684,7 +684,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
|
||||
CWalletScanState wss;
|
||||
|
||||
DbTxn* ptxn = dbenv.TxnBegin();
|
||||
BOOST_FOREACH(CDBEnv::KeyValPair& row, salvagedData)
|
||||
for (CDBEnv::KeyValPair& row : salvagedData)
|
||||
{
|
||||
if (fOnlyKeys)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user