dcrd/dcrutil
Jonathan Chappelow 3a5281156b dcrutil: Block does not cache the header bytes
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.
2019-01-18 16:37:30 -06:00
..
txsort txsort: Implement stable tx sorting package. 2017-12-08 11:22:21 -06:00
address_test.go multi: Use regression test network in unit tests. 2018-10-09 19:40:10 -05:00
address.go multi: Use regression test network in unit tests. 2018-10-09 19:40:10 -05:00
amount_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
amount.go multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
appdata_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
appdata.go travis: add gosimple linter 2017-11-20 18:49:55 -06:00
bitflags.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
block_test.go dcrutil: Block does not cache the header bytes 2019-01-18 16:37:30 -06:00
block.go dcrutil: Block does not cache the header bytes 2019-01-18 16:37:30 -06:00
const.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
doc.go multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
example_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
go.mod release: Bump module versions and deps. 2018-12-10 11:18:00 -06:00
go.sum release: Tidy module files with published versions. 2018-12-12 12:18:11 -06:00
hash160.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
internal_test.go multi: Continue conversion from chainec to dcrec. 2018-07-04 11:21:43 -04:00
README.md Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
tx_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
tx.go dcrutil: Return deep copied tx in NewTxDeepTxIns. 2019-01-03 20:29:33 -06:00
wif_test.go multi: Resurrect regression network. 2018-10-09 18:52:13 -05:00
wif.go multi: Continue conversion from chainec to dcrec. 2018-07-04 11:21:43 -04:00

dcrutil

Build Status ISC License GoDoc

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.