lbcwallet/wtxmgr
Josh Rickmar 4656a00705 Improve wallet atomicity.
This changes the database access APIs and each of the "manager"
packages (waddrmgr/wstakemgr) so that transactions are opened (only)
by the wallet package and the namespace buckets that each manager
expects to operate on are passed in as parameters.

This helps improve the atomicity situation as it means that many
calls to these APIs can be grouped together into a single
database transaction.

This change does not attempt to completely fix the "half-processed"
block problem.  Mined transactions are still added to the wallet
database under their own database transaction as this is how they are
notified by the consensus JSON-RPC server (as loose transactions,
without the rest of the block that contains them). It will make
updating to a fixed notification model significantly easier, as the
same "manager" APIs can still be used, but grouped into a single
atomic transaction.
2018-05-23 19:38:56 -07:00
..
db.go Improve wallet atomicity. 2018-05-23 19:38:56 -07:00
doc.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
error.go Improve wallet atomicity. 2018-05-23 19:38:56 -07:00
example_test.go Update for recent chaincfg API changes. (#451) 2016-08-12 19:27:51 -05:00
kahnsort.go Update for recent chainhash-related API changes. (#450) 2016-08-08 14:49:09 -05:00
log.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
query.go Improve wallet atomicity. 2018-05-23 19:38:56 -07:00
query_test.go Drop fastsha256 in favor of crypto/sha256 (#468) 2017-01-12 09:47:46 -05:00
README.md Add wtxmgr package. 2015-04-25 00:42:28 -04:00
tx.go Improve wallet atomicity. 2018-05-23 19:38:56 -07:00
tx_test.go Drop fastsha256 in favor of crypto/sha256 (#468) 2017-01-12 09:47:46 -05:00
unconfirmed.go Improve wallet atomicity. 2018-05-23 19:38:56 -07: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.