Commit graph

15 commits

Author SHA1 Message Date
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
ce48290169 Rename new transaction register/notifications.
This commit renames the notifyallnewtxs RPC to notifynewtransactions to be
more consistent with the standard RPC names and to more accurately
reflect its intention which is to register for new transactions as they
are accepted to the memory pool.  In addition, the notifications produced
have been renamed to txaccepted and txacceptedverbose depending on whether
or not the verbose flag was set when the client registered to receive the
notifications via notifynewtransactions.

This closes conformal/btcd#98.
2014-04-15 13:08:26 -05:00
Dave Collins
f389d39c43 Update tests for notifynewtxs -> notifyreceived. 2014-04-14 22:45:56 -05:00
Dave Collins
6f08ca8a8a Correct unmarshal for GetAddressBalanceCmd.
The unmarshaller for the GetAddressBalanceCmd was calling the wrong parse
function.  It wasn't caught by the tests because the error on
UnmarshalJSON was being ignored, so this commit also updates the tests to check the
error.
2014-04-11 09:04:53 -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
dd3813d811 Bootstrap unspent outpoints for rescan requests. 2014-03-21 15:54:15 -05:00
Josh Rickmar
5c66641735 Make tests build again. 2014-02-10 09:11:25 -05:00
Francis Lam
07c403efd0 Added commands to support notifyallnewtxs
Sending NotifyAllNewTXsCmd will register websocket client to receive
notifications on all new transactions.

Once registered the client will receive either AllTxNtfn or
AllVerboseTxNtfn based on the required verbose field in the
NotifyAllNewTXsCmd.
2014-02-08 17:03:22 -05:00
Josh Rickmar
f6c7cf92fd Make go vet happy. 2014-02-04 17:00:27 -05:00
David Hill
463029df76 gofmt 2014-02-04 16:02:45 -05:00
Josh Rickmar
50a1c37317 Remove parameters for createencryptedwallet.
The createencryptedwallet extension RPC request should not be used to
create wallets for additional accounts.  Instead, all btcwallet
accounts should use the same passphrase as the default account's
wallet.  This change removes the account name and description
parameters from createencryptedwallet, as it will only be used to
create the default account.
2014-01-24 11:16:59 -05:00
Josh Rickmar
05a0ba18b4 Kill GetBalancesCmd. 2014-01-09 13:14:53 -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