forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backport: merge bitcoin#21207, #22008, #22686, #22742, #19101, #22183, #22009, #22938, #23288, #24592 (wallet backports: part 2) #6529
Open
kwvg
wants to merge
14
commits into
dashpay:develop
Choose a base branch
from
kwvg:wbps_p2
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7cff222
merge bitcoin#22008: Cleanup and refactor CreateTransactionInternal
kwvg 251a478
merge bitcoin#22686: Use GetSelectionAmount in ApproximateBestSubset
kwvg b892840
merge bitcoin#22742: Use proper target in do_fund_send
kwvg bddc2ef
refactor: move tests to match upstream order, Dash tests at the tail
kwvg ac81c56
test: remove unneeded code from some `wallet_tests`
kwvg 56b35ea
partial bitcoin#19101: remove ::vpwallets and related global variables
kwvg ad50419
refactor: use `WalletLoader` to access wallets in `WalletInit` funcs
kwvg fcfbdca
refactor: separate out Dash-specific RPCs that rely on wallet logic
kwvg e5d7410
merge bitcoin#19101: remove ::vpwallets and related global variables
kwvg 05afcfd
merge bitcoin#22183: Remove `gArgs` from `wallet.h` and `wallet.cpp`
kwvg 08f36b0
merge bitcoin#22009: Decide which coin selection solution to use base…
kwvg aaba57f
merge bitcoin#22938: Add remaining scenarios of 0 waste, in wallet wa…
kwvg 5afab65
merge bitcoin#23288: remove usage of LegacyScriptPubKeyMan from some …
kwvg 0f7c173
merge bitcoin#24592: Delete old line of code that was commented out
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify wallet initialization state before auto-locking collaterals.
While the conditional check for wallet being enabled is good, we should verify that the wallet is fully initialized before attempting to auto-lock masternode collaterals to prevent potential race conditions.
🏁 Script executed:
Length of output: 13042
Potential Race Condition – Validate Wallet Initialization Before Auto-Lock
The current code in
src/init.cpp
calls the auto-lock function without explicitly verifying that the wallet (and by extension DIP3) is fully initialized. Although the wallet initialization interface (seesrc/wallet/init.cpp
) contains a comment noting that the operation must not occur before DIP3 is ready, there is no guard at the call site. This could lead to a race condition if the wallets aren’t completely set up yet.src/init.cpp
(Lines 2228-2232)