Commit graph

16 commits

Author SHA1 Message Date
Josh Rickmar
85cc323e34 Remove GetAddressBalanceCmd.
Support for this extension request has been removed from btcwallet and
will not be returning.
2014-07-26 17:53:35 -05:00
Josh Rickmar
385201f9da Update test coverage report. 2014-06-16 14:47:11 -05:00
Josh Rickmar
5a01ac2ed8 Update test coverage report. 2014-06-11 12:05:15 -05:00
Josh Rickmar
e12673df11 Switch notifyspent to take an array of outpoints.
This allows a wallet process to request spent notifications for many
outpoints at once, rather than creating separate requests for each.
2014-05-06 10:49:46 -05:00
Dave Collins
bfcd7f6790 Update for latest btcjson.RawCmd changes.
This commit modifies all of the commands and notifications to work
properly with the latest btcjson.RawCmd Params field changes.

This new approach is superior to the old method of using a []interface{}
because it means that each parameter is now unmarshalled into the expected
concrete type directly instead of whatever it happens to be in the JSON.

Since it is now preferred to use full blown structs for individual
parameters, the RescanCmd type has been changed to use a new OutPoint
that can be used directly for marshalling and unmarshalling instead of a
*btcwire.OutPoint.

Also, all of the MarshalJSON functions now make use of the new
btcjson.NewRawCmd function rather than repeating the same common field
over and over and all of the MarshalJSON, UnmarshalJSON, and parseX
functions have been made more consistent.

ok @jrick
2014-04-10 21:10:16 -05:00
Josh Rickmar
97439fa822 Implement rescanprogress notification. 2014-03-28 11:25:32 -05:00
Josh Rickmar
dd3813d811 Bootstrap unspent outpoints for rescan requests. 2014-03-21 15:54:15 -05:00
Josh Rickmar
bb4cba51cd Switch to new transaction notifications.
This change removes the processedtx notification, replacing it with
recvtx, and the spenttx notification, replacing it with redeemingtx.
Both new transactions return the full serialized transaction (encoded
in hexadecimal) rather than details about the transaction.

The old txmined notification has also been completely removed as it is
unreliable due to transaction malleability and no code should be
depending on it.
2014-02-24 14:52:09 -05:00
Josh Rickmar
05a0ba18b4 Kill GetBalancesCmd. 2014-01-09 13:14:53 -05:00
Josh Rickmar
d493181886 Add TxSpentNtfn to notify wallets spent outpoints. 2014-01-08 21:29:19 -05:00
Josh Rickmar
6e3f9e451b Rename RescanResultNtfn to ProcessedTxNtfn.
This notification should be generic enough to be used by both rescan
and normal block processing code, so give it a generic name too.
2014-01-08 15:23:59 -05:00
Josh Rickmar
9ea77c00f2 Add RescanResultNtfn to notify rescan results. 2014-01-08 11:28:38 -05:00
Josh Rickmar
87b7352008 Add getunconfirmedbalance extension. 2013-12-30 15:09:16 -05:00
Josh Rickmar
86575afa91 Add listaddresstransactions extension. 2013-12-30 11:03:05 -05:00
Josh Rickmar
2be94151a3 Add positive tests for commands.
Fixes #3.
2013-12-13 12:30:23 -05:00
Josh Rickmar
2731634dda Implement notifications that actually follow the JSON-RPC spec.
This changes notifications to JSON-RPC Requests, rather than
Responses, that also satisify the btcjson.Cmd interface and are
registered with btcjson's parser.  This prevents issues where JSON-RPC
Response IDs clash due to a client using the same ID as what an old
notification used.

As this changes the API, and thus, requires notification handlers to
be modified, the remaining missing notifications used by btcwallet
have been implemented.  Applications parsing these notifications, such
as btcgui, can now use a common handler function signature for all
notifications.

Test coverage for all notifications has been added (excluding testing
for badly-marshaled notifications with wrong numbers of parameters, or
wrong types).

Fixes #2.
2013-12-13 10:59:09 -05:00