Commit graph

19 commits

Author SHA1 Message Date
John C. Vernaleo
5444d262b8 Fix for signrawtransaction.
Add sendrawtransaction to list of commands we know the return type
for.
2013-10-04 13:18:49 -04:00
John C. Vernaleo
dc9618c9ab Add a Error() to the Error struct.
Resolves #6
2013-10-01 12:50:50 -04:00
John C. Vernaleo
5d40d51672 Correct bug in walletpassphrase arguements.
Thanks to pureveg and hngchiming for pointing it out.
2013-08-14 10:15:16 -04:00
John C. Vernaleo
2e77f0bb0e Add CreateMessageWithId to allow custom id to be sent with message. 2013-08-13 14:39:56 -04:00
John C. Vernaleo
96a68227bd Add RpcRawCommand and export ReadResultCommand.
Add new RpcRawCommand to get []byte represtation of reply instead of
btcjson.Result.

Export ReadResultCommand to allow caller of RpcRawCommand to deal with
the reply in the same way RpcCommand does.

Adjust test code to for the above changes.
2013-08-13 09:03:22 -04:00
John C. Vernaleo
da7e872354 Add proper result type for listunspent. 2013-08-09 15:49:31 -04:00
John C. Vernaleo
b28cded23e Add return types for additional commands and bug fixes.
Add return types for serveral additional commands.

Fix required vs. optional arguments for createrawtransaction.

Update tests and test coverage for all changes.
2013-08-09 14:06:45 -04:00
John C. Vernaleo
3b6c9b6d78 Simplify some code and increase test coverage. 2013-07-16 16:05:38 -04:00
John C. Vernaleo
ed7214afda Add types for a few more commands.
Add types for getmininginfo, getrawmempool, stop, and settxfee along
with tests.
2013-07-16 15:49:31 -04:00
John C. Vernaleo
a0dd367cd9 Add a few more commands with known types. 2013-07-12 12:39:12 -04:00
John C. Vernaleo
796df5b105 Tests and typos.
Increase test coverage.

Fix spelling and typos in a comment.

Minor update to todo in README.md
2013-07-12 11:04:00 -04:00
John C. Vernaleo
e3c9ebd26f Add more concrete types.
Add concrete return type for getaddressesbyaccount and make some of
the other command type handeling more explicit in the code.
2013-07-11 10:40:02 -04:00
John C. Vernaleo
39a1be8682 Increase test coverage. 2013-07-11 10:15:27 -04:00
John C. Vernaleo
86f848ddd4 Convert floats to int64.
Following the example of bitcoind and the bitcoin wiki, provide a
function to convert floats (which are returned by the json-rpc server)
to int64 (which is the normal representation for most values involving
bitcoins).
2013-07-08 17:20:41 -04:00
Dave Collins
10542e0573 Optimize and improve credential stripping code.
Since we already have the specific username and password we want to strip
from errors, use a specific search string rather than a generic regular
expression.  This is quite a bit more efficient than using regular
expressions and also has the benefit of being more accurate.

Also, rather than using the added overhead of fmt to convert the error to
a string, just call Error() directly on it to get the string.

Finally, instead of just stripping it, replace it with the literal
string "<username>:<password>" to avoid any possible confusion in the
error messages where it might otherwise appear the url was being
constructed incorrectly.

ok jcv@
2013-06-14 11:32:50 -05:00
John C. Vernaleo
2a475d7299 Need to test for nil before regex. 2013-06-14 11:47:09 -04:00
John C. Vernaleo
21d1240502 Update test_coverage.txt 2013-06-14 11:36:44 -04:00
John C. Vernaleo
2fc8982be5 Add tests for MarshallAndSend function. 2013-05-15 10:08:05 -04:00
John C. Vernaleo
d0d58c54db Initial implementation. 2013-05-13 12:25:41 -04:00