Commit graph

69 commits

Author SHA1 Message Date
Josh Rickmar
1d6741eb05 Allocate mutex on stack, spotted by davec. 2013-10-06 11:04:01 -04:00
Josh Rickmar
911e9fa5ae Add space to btcd auth string. 2013-10-04 16:40:57 -04:00
Josh Rickmar
8e9e6f6229 Handle basic auth for dialing btcd websocket connections. 2013-10-03 09:11:35 -04:00
Josh Rickmar
63686347c6 Create transactions using saved utxo data.
This is a big change that also many general fixes to problems found
when creating transactions.  In particular the Utxo and Tx formats and
serialization functions were updated with additional information that
would be necessary for rolling back old utxo and tx data data after
btcd chain switches.  This change also implements the json methods
'sendfrom' and 'sendmany' to create a new transaction based on a
frontend request.

Transactions are currently not sent to btcd since the tx relay code is
not finished yet, so a temporary error is returned back to frontends
who try to send new transactions.
2013-10-01 14:26:27 -04:00
Josh Rickmar
24d6168709 Reply with correct account balance for getbalance requests. 2013-09-05 15:31:39 -04:00
Josh Rickmar
290fdb5427 Read btcd:blockconnected hash string from correct map. 2013-09-05 12:58:19 -04:00
Josh Rickmar
2789502ec9 Begin tracking newly created wallets against btcd. 2013-09-05 12:50:39 -04:00
Josh Rickmar
ed98256553 Track opened wallets after establishing btcd connection. 2013-09-05 11:51:33 -04:00
Josh Rickmar
019df772b1 Use a single handler (per wallet) for all tx notifications. 2013-09-05 11:19:48 -04:00
Josh Rickmar
6e20de7c4a Interpret btcd:blockconnected hash as string.
btcd was changed to send the block hash for new block notifications as
a big endian string, so type assert as a string and convert to a
btcwire.ShaHash.
2013-09-04 20:38:57 -04:00
Josh Rickmar
419ceb55c6 Implement Utxo notification handler to add to utxo store. 2013-09-04 09:54:06 -04:00
Josh Rickmar
a1d3800feb Remove basic tx/utxo handlers as id routing handles this now. 2013-09-03 21:20:48 -04:00
Josh Rickmar
46077ac50a Pass wallet pointer as receiver for requester funcs.
Each wallet needs its own handler running and listening to replies
from btcd, so that wallet can be synced to disk with the new tx or
utxo information.  Another rounter to map from addresses to wallets
could have been written, but we'll use the JSON Id router message
router instead.
2013-09-03 19:05:59 -04:00
Josh Rickmar
3d6ad329d0 Set Jsonrpc string when manually creating json messages. 2013-09-03 16:35:54 -04:00
Josh Rickmar
9eae969230 Implement new wallet and chained address creation. 2013-09-03 00:10:32 -04:00
Josh Rickmar
cfde81a062 Remove shadowed variable. 2013-08-28 09:02:24 -04:00
Josh Rickmar
c86571be0c I even did the go fmt this time but forgot to stage it. 2013-08-27 17:19:35 -04:00
Josh Rickmar
f5a151571d Begin handling of newly connected blocks.
Utxo and Tx stores are not updated yet as they aren't being created at
the moment.  Disconnected blocks are currently ignored.
2013-08-27 16:47:50 -04:00
Josh Rickmar
a56e4e89d2 Initial commit. 2013-08-21 10:37:30 -04:00