Skip to content

Conversation

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jul 30, 2020

Current MakeCollateralAmounts implementation works incorrectly when fees are up. Which in its turn can cause issues like #3597. Adding fee calculations (instead of assumption that GetCollateralAmount() duff fee should be enough) should do the trick IMO. This is basically the same logic we applied to CreateDenominated in #3588.

Another assumption we use is that tallyItem.nAmount is enough to create at least CPrivateSend::GetMaxCollateralAmount() - CPrivateSend::GetCollateralAmount() duff collateral which is not always true actually.

Alternative to #3639

@xdustinface
Copy link

Sorry for not responding here for that long :D First i was distracted by LLMQs for a while, then i started to review/test here and while doing that i noticed that this PR at the end still doesn’t solve the initial issue. There are now even new cases introduced by this PR where unexpected transactions would pop up in the overview (e.g. if no change output is used and we only have one output). Actually i wanted to provide some fixes for this PR only but it turned out to be a bigger thing to make it totally right and then i ended up with #3657.

@UdjinM6
Copy link
Author

UdjinM6 commented Aug 11, 2020

Closing in fav of #3657

@UdjinM6 UdjinM6 closed this Aug 11, 2020
@PastaPastaPasta
Copy link
Member

removing "backport" label

@UdjinM6 UdjinM6 removed this from the 16 milestone Aug 26, 2020
@UdjinM6 UdjinM6 deleted the fixmakecol branch November 26, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants