-
Notifications
You must be signed in to change notification settings - Fork 492
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
Try not to use unconfirmed coins when BnB. #12306
Conversation
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.
This means if the initial transaction used an unconfirmed coin, then BaB is allowed to choose any coin from Critical phase and vice versa. I think this is wrong.
I think we should separate the two exclusion.
coinsToUse = spentCoins.Any(coinsToExclude.Contains) ? coinsToUse : coinsToUse.Except(coinsToExclude).ToImmutableArray();
coinsToUse = spentCoins.Any(unconfirmedCoins.Contains) ? coinsToUse : coinsToUse.Except(unconfirmedCoins).ToImmutableArray();
or something like this.
You are right. I fixed that. |
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.
LGTM
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.
utack c79a8ed
Can someone test this? It is not trivial, maybe on RegTest with CTRL C-D |
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.
tACK
minor thing (can be ignored if we want to stick to the convention):
WalletWasabi.Fluent/Models/Transactions/PrivacySuggestionsModel.cs
Outdated
Show resolved
Hide resolved
@BTCparadigm can you check if this solves your issue? |
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.
tACK
cACK @molnard unfortunately I can't before next week. |
We have time until the release so this can stay open until that. Can you test and reply back here? |
@molnard I can't reasonably test this in mainnet at the moment, so anyone willing to play with regtest or with mainnet test coins can do it too. |
I tested it on regtest, it worked as expected |
Fixes: #11951
I used the same logic as used for coins in the critical cj phase which is the following currently:
This PR adds the same behavior regarding unconfirmed coins.