Post
Topic
Board Development & Technical Discussion
Re: How to detect the change output?
by
BkkCoins
on 14/12/2012, 08:45:00 UTC
The problem is that size() is one in the common case of one payee, so GetRandInt will always return 0.The change ends up in the first output.

I think it should be size()+1.
Even with many outputs it would always not be the last one. Would it be useful as well to randomly split change into more than one address when above some value? To further complicate predictability.