lbcwallet/txstore
Josh Rickmar 9153a342e4 Improve txstore unspent output bookkeeping.
This change "reverses" the mapping used by the transaction store to
reference and lookup unspent credits.  Rather than mapping slice
indexes of a block, and then another block map for slice indexes of
transactions with unspent credits, and requiring a lookup through each
credit for whether it is spent or unspent, keep a simple map of
outpoints to a lookup key to find the transaction in a block.

This has a positive effect on performance when searching for previous
transaction outputs that have been spent by a newly-inserted
transaction.  Rather than iterating through every block with an
unspent credit, and then every transaction with unspent credits, a
simple map lookup can be done to check whether a transaction input's
previous outpoint is marked as unspent by wallet, and then access the
transaction record itself by the lookup key.  While transactions
created by wallet with the sendfrom/many RPCs may mark debits with the
previous credits already known, the previous outputs may still not be
known if a debiting transaction was added by rescan, or notified as a
result of a create+sendrawtransaction.
2014-06-17 22:50:34 -05:00
..
doc.go go fmt. 2014-05-20 20:09:33 -05:00
fixedIO_test.go Rename tx package to txstore. 2014-05-08 14:51:33 -05:00
json.go Return non-nil RPC results for 0 length slices. 2014-06-12 13:58:23 -05:00
serialization.go Improve txstore unspent output bookkeeping. 2014-06-17 22:50:34 -05:00
tx.go Improve txstore unspent output bookkeeping. 2014-06-17 22:50:34 -05:00
tx_test.go Updates for btcutil and btcscript's btcnet conversion. 2014-05-27 17:49:36 -05:00