This updates dcrutil.NewTxDeepTxIns to take a dcrutil.Tx as a parameter rather than a wire.MsgTx, which allows for the tree and index set on the input dcrutil.Tx to be copied to the new dcrutil.Tx. This is less error prone for callers since the existing implementation is often used to replace an existing dcrutil.Tx with the deep copy that this function creates, but a side effect that is easy to miss is that the new dcrutil.Tx would have reset the tree and index fields which can lead to unintended behavior. |
||
|---|---|---|
| .. | ||
| txsort | ||
| amount_test.go | ||
| amount.go | ||
| appdata_test.go | ||
| appdata.go | ||
| bitflags.go | ||
| block_test.go | ||
| block.go | ||
| const.go | ||
| doc.go | ||
| example_test.go | ||
| go.mod | ||
| go.sum | ||
| hash160.go | ||
| README.md | ||
| tx_test.go | ||
| tx.go | ||
| util_test.go | ||
| util.go | ||
| wif_test.go | ||
| wif.go | ||
dcrutil
Package dcrutil provides decred-specific convenience functions and types. A comprehensive suite of tests is provided to ensure proper functionality.
This package was developed for dcrd, a full-node implementation of Decred which is under active development by Company 0. Although it was primarily written for dcrd, this package has intentionally been designed so it can be used as a standalone package for any projects needing the functionality provided.
Installation and Updating
This package is part of the github.com/decred/dcrd/dcrutil/v3 module. Use the
standard go tooling for working with modules to incorporate it.
License
Package dcrutil is licensed under the copyfree ISC License.