98f65ac943
In this commit, we add a new test case to the wtxmgr store to ensure that duplicate outputs don't exists within the store. It's possible for this to happen if an output is marked as unconfirmed credit, then marked as confirmed once it confirms, and once again marked as unconfirmed. It can be marked as unconfirmed again due to the backend notifying the client about this transaction. Ideally this should not happen, but the root cause is much more involved. As a stop gap, we'll ensure that outputs can be marked as unconfirmed credits more than once whatsoever. As is, the test case fails, which proves that this is an issue. A later commit will resolve this and the test case should pass. |
||
---|---|---|
.. | ||
db.go | ||
doc.go | ||
error.go | ||
example_test.go | ||
kahnsort.go | ||
log.go | ||
query.go | ||
query_test.go | ||
README.md | ||
tx.go | ||
tx_test.go | ||
unconfirmed.go |
wtxmgr
[] (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
[] (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.