50869085eb
Add and test functions which can be used to write optional transaction labels to disk in their own bucket. These labels are keyed by txid and write the labels to disk using-length value encoding scheme. Although the length field is not required at present, it is added to allow future extensibility without a migration. This approach is chosen over adding this information to txRecords, Because a migration would be required to add a field after the variable Length serialized tx. The put label function will overwrite existing labels if called more than once for the same txid. User side validation of whether we want to override this label should be performed by calling code. Labels must be > 0 characters and <= 500 characters (an arbitrarily chosen limit). |
||
---|---|---|
.. | ||
db.go | ||
doc.go | ||
error.go | ||
example_test.go | ||
go.mod | ||
go.sum | ||
kahnsort.go | ||
kahnsort_test.go | ||
log.go | ||
migrations.go | ||
migrations_test.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.