Commit graph

3 commits

Author SHA1 Message Date
Josh Rickmar
6597d789b7 Avoid slice out-of-bounds indexing panic.
The gettransaction handler was attempting to lookup the "sent-to"
address of an outgoing transaction from the transaction store (as a
wallet credit).  This is the incorrect address when sending to an
address controlled by another wallet, and panics when there are no
credits (for example, sending to another wallet without any change
address).  Instead, use the first non-change output address is used as
the address of the "send" result.

This fixes the panic reported when debugging issue #91.

While here, fix the category strings used for wallet credits to
support immature and generate (the categories for coinbase outputs).
2014-06-02 11:56:38 -05:00
Josh Rickmar
4495a523d8 Updates for btcutil and btcscript's btcnet conversion. 2014-05-27 17:49:36 -05:00
Josh Rickmar
f36a83b3cc Rename tx package to txstore.
Prodded by @davecgh, and I had this change in the back of my head for
a while now anyways.
2014-05-08 14:51:33 -05:00
Renamed from tx/json.go (Browse further)