Commit graph

63 commits

Author SHA1 Message Date
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