lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

Add new transferfromaddress rpc command #82

Closed lbrynaut closed 6 years ago

lbrynaut commented 6 years ago

Add new transferfromaddress rpc command that spends from a specified source address and sends any change sent back to the same address (resolves #40)

kaykurokawa commented 6 years ago

I don't think I'd want to alter the functionality of CreateTransaction/CommitTransaction/SendMoney for this specific custom purpose.It would be much better if we just created a custom function , that will essentially achieve what you can do through the rpc using createrawtransaction and signrawtransaction.

First reason is mainly bureaucratic in that it now takes additional work to keep this PR and merge in changes from Bitcoin Core which has made significant changes to the wallet code.

Second reason is that SendMoney does a lot othings that this RPC command does not need to do i.e, reserve a key from the key pool, gather inputs. Also, the function is specifically designed to make the best effort to preserve privacy , which is the opposite of what this command does.