-
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: partial bitcoin#25507; fix selection of fully mixed coins, disable BnB #6600
base: develop
Are you sure you want to change the base?
Conversation
…f subtracting fees from output 140d942 wallet: don't add change fee to target if subtracting fees from output (S3RK) Pull request description: Change fee is payed by the recipient, so we don't need to add it to our target for coin selection. ACKs for top commit: achow101: ACK 140d942 ishaanam: ACK 140d942 furszy: Code review ACK 140d942 Tree-SHA512: b5efd0264c47ecee9204a3fd039bad24c69f9e614c6e1d9bb240ee5be6356b175aa074f3be123e6cfb8becd4d7bd1028eebe18801662cc69d19413d8d5a9dd5c
5544542
to
0c32cf4
Compare
WalkthroughThe changes modify the coin selection logic used in wallet transactions. In the updated implementation, the BnB coin selection method is effectively disabled by placing it behind an always-false condition. Instead, a new variable, 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🔇 Additional comments (4)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -373,7 +373,7 @@ bool CWallet::AttemptSelection(const CAmount& nTargetValue, const CoinEligibilit | |||
std::vector<OutputGroup> positive_groups = GroupOutputs(coins, coin_selection_params, eligibility_filter, true /* positive_only */); | |||
std::set<CInputCoin> bnb_coins; | |||
CAmount bnb_value; | |||
if (SelectCoinsBnB(positive_groups, nTargetValue, coin_selection_params.m_cost_of_change, bnb_coins, bnb_value)) { | |||
if (false && SelectCoinsBnB(positive_groups, nTargetValue, coin_selection_params.m_cost_of_change, bnb_coins, bnb_value)) { |
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.
should it be always disabled or only in case of CJ?
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.
yes, we should avoid spending cj-related coins via regular send
Issue being fixed or feature implemented
Coin selection is a bit broken on develop rn, there are few issues:
Issues were introduced via recent wallet backports, so it's on
develop
only, no released versions are affected.What was done?
How Has This Been Tested?
Run
./src/test/test_dash -t spend_tests
and./test/functional/wallet_basic.py
develop
+ 5544542 - > failureThis branch -> success
Breaking Changes
Checklist: