Commit graph

17 commits

Author SHA1 Message Date
Dave Collins
3e800e154c Import btcws repo into btcjson/btcws directory. 2015-02-19 12:53:08 -06:00
Dave Collins
b8f3da692e Update btcjson path import paths to new location. 2015-02-19 11:54:02 -06:00
Dave Collins
80aaecd8a2 Update btcjson import paths to new location. 2015-01-16 23:54:00 -06:00
Dave Collins
0ff8ea3848 Update btcws import paths to new location. 2015-01-16 23:35:26 -06:00
Josh Rickmar
de236d5395 Use hashes for rescan, add hash+time to ntfns.
ok @davecgh
2014-07-25 13:28:37 -05:00
Dave Collins
1acb4b8151 goimports -w . 2014-07-02 19:44:43 -05:00
Josh Rickmar
160113d612 Add rescanfinished notification. 2014-06-16 14:46:25 -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
fdc49d6a30 Convert NewTxNtfn to use new concrete type.
The NewTxNtfn notification was previously using a map[string]interface.
This commit modifies it to use the new concrete type
btcjson.ListTransactionsResult instead which allows nicer marshalling and
unmarshalling.

ok @jrick
2014-04-11 10:02:16 -05:00
Josh Rickmar
97439fa822 Implement rescanprogress notification. 2014-03-28 11:25:32 -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
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
0e8cbf71e8 Replace Error with Errorf, found by go vet. 2014-02-04 13:52:15 -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
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