You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, it would be good to add this test. If someone wants to work on this, I would like to suggest that they peruse the very similar test for BnB here:
And to understand what CoinGrinder is actually doing and how it work, I would suggest that prospective implementers peruse the PR that added CoinGrinder starting with this commit: 6cc9a46
Activity
yancyribbens commentedon Sep 17, 2025
cc @murchandamus
brunoerg commentedon Sep 18, 2025
For reference: https://corecheck.dev/mutation/src/wallet/coinselection.cpp#L466 and https://corecheck.dev/mutation/src/wallet/coinselection.cpp#L468
murchandamus commentedon Oct 16, 2025
Yeah, it would be good to add this test. If someone wants to work on this, I would like to suggest that they peruse the very similar test for BnB here:
bitcoin/src/wallet/test/coinselection_tests.cpp
Line 166 in e744fd1
And to understand what CoinGrinder is actually doing and how it work, I would suggest that prospective implementers peruse the PR that added CoinGrinder starting with this commit: 6cc9a46
yancyribbens commentedon Oct 24, 2025
Something like this would work:
{ // ################################################################################################################# // 8) Max iterations // ################################################################################################################# CAmount target = 8 * COIN; int max_selection_weight = 3200; // WU const auto& res = CoinGrinder(target, dummy_params, m_node, max_selection_weight, [&](CWallet& wallet) { CoinsResult doppelgangers; for (int i = 0; i < 19; ++i) { add_coin(doppelgangers, wallet, CAmount(1 * COIN + i), CFeeRate(0), 144, false, 0, true, 96 + i); } return doppelgangers; }); BOOST_CHECK(!res); }