Commit graph

6 commits

Author SHA1 Message Date
Josh Rickmar 830829a79f Add dirty wallets to disc sync schedule.
There were several places where various account files (wallet, tx, or
utxo stores) were being marked as dirty, and then not being either
immediately synced to disk or marked as a dirty account so they would
be scheduled to be synced to disk.  This change adds Account functions
to mark as dirty and add the account to the map of scheduled accounts
so they won't be missed by the disk syncer goroutine.
2014-01-23 12:38:39 -05:00
Owain G. Ainsworth ce2decb275 make TxStore use generic interface
Means we can replace a bunch of type assertions with generic code.
2014-01-23 00:00:10 +00:00
Josh Rickmar 8952fc5acf Remove unnecessary string copy.
Strings are immutable, so instead of copying as a new variable (like
how was needed when receiving byte slices), just pass the marshaled
JSON string to the notification processing code.
2014-01-17 18:05:34 -05:00
Josh Rickmar 11ea5e31b4 Receive btcd messages as websocket.TextFrame. 2014-01-17 18:03:56 -05:00
David Hill d2d278a9ee fix typo 2014-01-15 08:51:20 -05:00
Josh Rickmar 15ffc674a9 Rework the btcd RPC connection.
This change greatly cleans up the RPC connection between btcwallet and
btcd.  Proper (JSON-RPC spec-following) notifications are now expected
rather than Responses with a non-empty IDs.

A new RPCConn interface type has also been introduced with a
BtcdRPCConn concrete type for btcd RPC connections.  Non-btcd-specific
code handles the RPCConn, while the btcd details have been abstracted
away to a handful of functions.  This will make it easier to write
tests by creating a new fake RPC connection with hardcoded expected
replies.
2014-01-09 14:07:17 -05:00