i would like to return change to the source input address in a coind.
the point being easy tracking of coins, and easy backing up.
it's for a faucet style use.
i assume the simplest thing is to change the src code, as i cannot find any other method other than creating raw tx every time.
can anyone help with the appropriate changes ??
// no coin control: send change to newly generated address
else
{
// Note: We use a new key here to keep it from being obvious which side is the change.
// The drawback is that by not reusing a previous key, the change may be lost if a
// backup is restored, if the backup doesn't have the new private key for the change.
// If we reused the old key, it would be possible to add code to look for and
// rediscover unknown transactions that were written with keys of ours to recover
// post-backup change.
// Reserve a new key pair from key pool
CPubKey vchPubKey = reservekey.GetReservedKey();
scriptChange.SetDestination(vchPubKey.GetID());
}