lbcwallet/wtxmgr
Josh Rickmar e12d23716f Sort unmined transactions in their dependency order.
This changes the wtxmgr.Store.UnminedTxs method to sort transactions,
using the Kahn topological sort algorithm, before returning
transactions to the caller.  This is possible because transactions
form a sort of directed acyclic graph (DAG) where transactions
reference other transactions to spend their outputs (multiple
referenced outputs from a single transaction spent by the same
transaction count as a single graph edge).

This prevents the possibility of orphan rejection errors when sending
unmined transactions to a full node at startup.  As these transactions
are sent using the sendrawtransaction RPC, which does not permit
orphans, this topological sort is required.

Fixes #156.
2016-04-05 11:11:15 -04:00
..
db.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
doc.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
error.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
example_test.go Manage wallet db namespaces from wallet package. 2016-03-21 11:25:28 -04:00
kahnsort.go Sort unmined transactions in their dependency order. 2016-04-05 11:11:15 -04:00
log.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
query.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
query_test.go Add goclean.sh script from btcd. 2016-03-31 11:43:54 -04:00
README.md Add wtxmgr package. 2015-04-25 00:42:28 -04:00
tx.go Manage wallet db namespaces from wallet package. 2016-03-21 11:25:28 -04:00
tx_test.go Add goclean.sh script from btcd. 2016-03-31 11:43:54 -04:00
unconfirmed.go Sort unmined transactions in their dependency order. 2016-04-05 11:11:15 -04:00

wtxmgr

[Build Status] (https://travis-ci.org/btcsuite/btcwallet)

Package wtxmgr provides storage and spend tracking of wallet transactions and their relevant input and outputs.

Feature overview

  • Storage for relevant wallet transactions
  • Ability to mark outputs as controlled by wallet
  • Unspent transaction output index
  • Balance tracking
  • Automatic spend tracking for transaction inserts and removals
  • Double spend detection and correction after blockchain reorgs
  • Scalable design:
    • Utilizes similar prefixes to allow cursor iteration over relevant transaction inputs and outputs
    • Programmatically detectable errors, including encapsulation of errors from packages it relies on
    • Operates under its own walletdb namespace

Documentation

[GoDoc] (http://godoc.org/github.com/btcsuite/btcwallet/wtxmgr)

Full go doc style documentation for the project can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/btcsuite/btcwallet/wtxmgr

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/btcsuite/btcwallet/wtxmgr

Installation

$ go get github.com/btcsuite/btcwallet/wtxmgr

Package wtxmgr is licensed under the copyfree ISC License.