Check that all transaction destinations, including change address if specified, are distinct.
The error is also raised in the UI:
Check that all transaction destinations, including change address if specified, are distinct.
The error is also raised in the UI:
sendmany
but at the moment the errors are different. Not sure it should change there or try to make this equal (the problem is that the errors in CWallet
are translated and RPC errors aren’t).
Concept ACK, but now there’s two different error messages depending on whether the duplicate is a change address or a regular destination:
This looks good but the comments above need addressing (feel free to cherry-pick from my 201811_duplicate_dest_check
branch)
EDIT: This will also prevent fundrawtransaction
from funding a transaction with duplicate outputs, correct? Is that what we want? If someone has gone to the effort of creating a transaction with duplicate outputs manually, maybe we should allow it there?
Check that all transaction destinations, including change address
if specified, are distinct.
Closing for now, as @meshcollider mentions, this approach breaks the following case: