49 Commits
Author SHA1 Message Date
34bed0ed8c test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation
On FreeBSD, the default ephemeral port range (10000-65535) overlaps
with the test framework's static port range (11000-26000), causing
intermittent "address already in use" failures when tests use dynamic
port allocation (port=0).

Add a helper function that sets the IP_PORTRANGE/IPV6_PORTRANGE socket
option to IP_PORTRANGE_HIGH before binding, which requests ports from
the high range (49152-65535) instead. This range does not overlap with
the test framework's static ports.

Constants from FreeBSD's netinet/in.h and netinet6/in6.h:
- IP_PORTRANGE = 19 (for IPv4 sockets)
- IPV6_PORTRANGE = 14 (for IPv6 sockets)
- IP_PORTRANGE_HIGH = 1

Fixes: bitcoin/bitcoin#34331

Co-Authored-By: Vasil Dimov <vd@FreeBSD.org>
Co-Authored-By: MarcoFalke <*~=\`'#}+{/-|&$^_@721217.xyz>
2026-01-20 12:08:05 -08:00
woltx ce63d37ebe test: use dynamic port allocation to avoid test conflicts
Use port=0 for dynamic port allocation in test framework components
to avoid "address already in use" errors from concurrent tests or
ports stuck in TIME_WAIT state from previous test runs.

Changes:
- socks5.py: Update conf.addr after bind() to reflect actual port
- p2p.py: Retrieve actual port after create_server() when port=0
- feature_proxy.py: Use port=0 for all SOCKS5 proxy servers
- feature_anchors.py: Use port=0 for onion proxy server
2026-01-09 18:43:44 -08:00
w0xlt a3c71c7201 [test] Add BIP 328 test vectors for Musig2 2026-01-06 15:53:56 -08:00
woltx 4d4789dffa net: Prevent node from binding to the same CService
Currently, if the user inadvertently starts the node with duplicate bind options,
such as `-bind=0.0.0.0 -bind=0.0.0.0`, it will cause a fatal error with the
misleading message "Bitcoin Core is probably already running".

This commit adds early validation to detect duplicate bindings across all binding
configurations (-bind, -whitebind, and onion bindings) before attempting to bind.
When duplicates are detected, the node terminates with a clear, specific error
message: "Duplicate binding configuration for address <addr>. Please check your
-bind, -bind=...=onion and -whitebind settings."

The validation catches duplicates both within the same option type (e.g.,
`-bind=X -bind=X`) and across different types (e.g., `-bind=X -whitebind=Y@X`),
helping users identify and fix configuration mistakes.
2025-09-04 23:40:02 -07:00
woltx 60d1042b9a wallet: Remove unused WalletFeature enums 2025-07-25 14:49:47 -07:00
woltx 66de58208a wallet: Remove CWallet::nWalletVersion and related functions 2025-07-25 14:49:47 -07:00
woltx 7cda3d0f5b wallet: Remove IsFeatureSupported() and CanSupportFeature() 2025-07-25 14:45:01 -07:00
woltx ba01585229 wallet: MigrateToDescriptor no longer calls CanSupportFeature 2025-07-25 14:10:32 -07:00
woltx 63acee2797 wallet: Remove GetClosestWalletFeature() 2025-07-25 14:10:32 -07:00
woltx e27da3150b wallet: Remove GetVersion() 2025-07-25 14:10:32 -07:00
w0xlt d89c6fa4a7 wallet: Remove upgradewallet RPC 2025-07-15 11:00:48 -07:00
w0xlt 8cc9845b8d wallet, rpc: Use OUTPUT_TYPES to describe the output types instead of hardcoding them 2025-06-18 18:11:28 -03:00
w0xlt 9d9a098530 gui: Fix translator comment for Restore Wallet QInputDialog
This also changes the window title name
from `Restore Name` to `Restore Wallet`.
2022-07-22 23:25:44 -03:00
w0xlt c6c35db057 wallet: change ScanForWalletTransactions to use Ticks() 2022-07-12 10:29:08 -03:00
w0xlt bc13ec888c doc: Add a release note about the "restore wallet" menu item 2022-07-01 10:16:42 -03:00
w0xlt baf4efe02f rpc: use enum instead of string for filter type 2022-06-27 14:33:10 -03:00
e7a3f698b5 gui: Add Wallet Restore in the GUI
Co-authored-by: Shashwat Vangani <85434418+shaavan@users.noreply.github.com>
Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2022-06-27 10:00:18 -03:00
a89ddfbe22 wallet: Save wallet scan progress
Currently, the wallet scan progress is not saved.
If it is interrupted,  it will be necessary to start from
scratch on the next load.
With this change, progress is saved every 60 seconds.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
Co-authored-by: Jon Atack <jon@atack.com>
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2022-06-23 17:13:40 -03:00
w0xlt 67364ebe4c test, qt: Add tests for GUIUtil::extractFirstSuffixFromFilter 2022-06-21 19:19:31 -03:00
ace9af5688 qt: Replace QRegExp with QRegularExpression
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
2022-06-21 19:19:18 -03:00
w0xlt c378535e28 qt: Add a function that extracts the suffix from a filter
Extract the 'Extract first suffix from filter pattern...'
functionality into a testable utility function
2022-06-21 19:16:39 -03:00
w0xlt 8cfb5627d5 qt, refactor: add translator comments in TransactionDesc::FormatTxStatus() 2022-06-02 13:56:36 -03:00
w0xlt 0fb2908708 refactor: replace RecursiveMutex m_banned_mutex with Mutex 2022-05-24 09:54:28 +02:00
w0xlt 784c316f9c scripted-diff: rename m_cs_banned -> m_banned_mutex
-BEGIN VERIFY SCRIPT-
s() { sed -i 's/m_cs_banned/m_banned_mutex/g' $1; }
s src/banman.cpp
s src/banman.h
-END VERIFY SCRIPT-
2022-05-24 09:54:21 +02:00
w0xlt bdc6881e2f wallet: Change log interval to use steady_clock
This refactors the log interval variables to use `steady_clock`
as it is best suitable for measuring intervals.
2022-05-10 21:12:52 -03:00
w0xlt 92b35aba22 index, refactor: Change sync variables to use std::chrono::steady_clock
This refactors the sync variables to use `std::chrono::steady_clock`
as it is best suitable for measuring intervals.
2022-05-08 04:02:33 -03:00
w0xlt 709af67add p2p: replace RecursiveMutex m_total_bytes_sent_mutex with Mutex 2022-04-22 05:40:24 -03:00
w0xltandHennadii Stepanov 8be75fd0f0 p2p: add assertions and negative TS annotations for m_total_bytes_sent_mutex
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-04-22 05:40:24 -03:00
w0xlt a237a065cc scripted-diff: rename cs_totalBytesSent -> m_total_bytes_sent_mutex
-BEGIN VERIFY SCRIPT-
sed -i 's/cs_totalBytesSent/m_total_bytes_sent_mutex/g' -- $(git grep --files-with-matches 'cs_totalBytesSent')
-END VERIFY SCRIPT-
2022-04-18 13:23:26 -03:00
w0xlt 6f29409ad1 test: Add a test that creates a wallet with invalid parameters
Invalid parameters must not prevent a new wallet with the same name
from being created with the correct parameters
2022-04-16 04:46:22 -03:00
w0xlt 0359d9b6a3 Change wallet validation order
In the current code, the database is created before the last validation,
which checks that passphrase is set and private keys are disabled.

Therefore, if this validation fails, it will result in an empty database
and the user will not be able to recreate a wallet with the same name
and with the correct parameters.
2022-04-15 03:48:33 -03:00
w0xlt 343f83d088 qt, refactor: Use member initializers in TransactionStatus 2022-04-13 12:24:37 -03:00
w0xlt 66d58ad7a9 qt, refactor: remove unused field qint64 TransactionStatus::open_for 2022-04-13 12:24:37 -03:00
w0xlt ad6adedb46 qt, refactor: remove unused parameters in TransactionDesc::FormatTxStatus() 2022-02-24 13:47:53 -03:00
w0xlt 045f8d0310 scripted-diff: rename nDepth -> depth
-BEGIN VERIFY SCRIPT-
s() { sed -i -e 's/nDepth/depth/g' $(git grep -l 'nDepth' $1); }
s src/qt/transactiondesc.cpp
-END VERIFY SCRIPT-
2022-02-24 13:47:53 -03:00
w0xlt b1bc1431db qt, refactor: remove redundant scope in TransactionDesc::FormatTxStatus() 2022-02-24 13:47:53 -03:00
w0xlt fe7c81e34e qt: change QLineEdit error background 2022-02-18 18:06:34 -03:00
w0xlt 020acea99b refactor: replace RecursiveMutex m_chainstate_mutex with Mutex 2022-01-24 13:15:08 -03:00
w0xltandHennadii Stepanov ddeefeef20 refactor: add negative TS annotations for m_chainstate_mutex
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-01-24 13:15:08 -03:00
w0xlt dec787d8ac refactor: replace RecursiveMutex m_addr_local_mutex with Mutex 2022-01-20 17:34:48 -03:00
w0xlt 93609c1dfa p2p: add assertions and negative TS annotations for m_addr_local_mutex 2022-01-20 17:34:48 -03:00
w0xlt c4a31ca267 scripted-diff: rename cs_addrLocal -> m_addr_local_mutex
-BEGIN VERIFY SCRIPT-
sed -i 's/cs_addrLocal/m_addr_local_mutex/g' -- $(git grep --files-with-matches 'cs_addrLocal')
-END VERIFY SCRIPT-
2022-01-20 05:43:10 -03:00
w0xlt 1dfd31bc26 scripted-diff: rename m_cs_chainstate -> m_chainstate_mutex
-BEGIN VERIFY SCRIPT-
s() { sed -i 's/m_cs_chainstate/m_chainstate_mutex/g' $1; }
s src/validation.cpp
s src/validation.h
-END VERIFY SCRIPT-
2022-01-19 14:43:15 -03:00
w0xlt 5e7e4c9f6e refactor: replace RecursiveMutex g_maplocalhost_mutex with Mutex 2022-01-19 07:06:36 -03:00
w0xlt a7da1409bc scripted-diff: rename cs_mapLocalHost -> g_maplocalhost_mutex
-BEGIN VERIFY SCRIPT-
s() { sed -i 's/cs_mapLocalHost/g_maplocalhost_mutex/g' $1; }
s src/net.cpp
s src/net.h
s src/rpc/net.cpp
s src/test/net_tests.cpp
-END VERIFY SCRIPT-
2022-01-19 07:04:52 -03:00
w0xlt 1831d43e8f Change 'Show' icon 2021-12-31 14:13:20 -03:00
w0xlt 62fa61fa4a refactor: remove the wallet folder if the restore fails 2021-12-15 18:41:40 -03:00
w0xlt abbb7eccef refactor: Move restorewallet() RPC logic to the wallet section
It also simplifies restorewallet() and loadwallet() RPC error handling.
2021-12-15 18:41:40 -03:00
w0xlt 4807f73f48 refactor: Implement restorewallet() logic in the wallet section
Currently restorewallet() logic is written in the RPC layer
and it can´t be reused by GUI. So it reimplements this in the
wallet and interface sections and then, GUI can access it.
2021-12-14 19:18:56 -03:00