bitcoin/bitcoin — pull request #4863 by bencxr (2014-09-07 12:46:47+00:00)
Title: Fix missing gettransaction entries in rpcclient

When getting a transaction to a watch-only wallet, the gettransaction RPC call should show transaction details (amount, address, received). This won't happen unless the true "includewatchonly" param is specified to the rpc.

But, when doing
bitcoin-cli gettransaction "7b38c67e8f32678bd19ad3537b384f7a619ba1e5bdacac983c9a4cc2c16b657e" true

we currently get an error:
error: {"code":-1,"message":"value is type str, expected bool"}

this is the result of the "true" value method not being serialized to json properly in the rpc client due to the gettransaction entry being missing in rpcclient. I believe this was a mistake introduced here:
https://github.com/bitcoin/bitcoin/commit/0fa2f8899adf8f9f0ead29ba5d708ead6c5d4eaf

I added the entries correctly (for both 1 and 2 arguments) and also updated the rpc help message for gettransaction to let users know about the includeWatchonly param, following the conventions for the other rpc calls.