This fixes a bug in dcrutil where (*Block).BlockHeaderBytes would incorrectly return a cached byte slice of the serialized block instead of just the header. This would only happen after the cache had been set, such as through a call to block.Bytes(), or construction via NewBlockFromBytes or NewBlockFromBlockAndBytes. The comments are also changed accordingly and wrapped after 80 columns. Update TestBlock with a test for (*Block).BlockHeaderBytes that follows (*Block).Bytes. |
||
|---|---|---|
| .. | ||
| txsort | ||
| address_test.go | ||
| address.go | ||
| 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 | ||
| internal_test.go | ||
| README.md | ||
| tx_test.go | ||
| tx.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
$ go get -u github.com/decred/dcrd/dcrutil
License
Package dcrutil is licensed under the copyfree ISC License.