Commit graph

7 commits

Author SHA1 Message Date
Josh Rickmar
0d01bb9cb9 Optimize NewShaHashFromStr. 2015-01-06 20:04:33 -05:00
Dave Collins
3a1009529f goimports -w . 2014-07-02 19:43:33 -05:00
Dave Collins
dfdd223223 Move genesis blocks to btcnet package.
The genesis blocks are not really part of the wire protocol rather they
are part of a network parameters.  Thus, this commit moves the all of the
gensis blocks and tests to the btcnet package.

Also, create variables in the test package for the mainnet genesis hash,
merkle root, and coinbase transaction for use throughout the tests since
they the exported values are no longer available.
2014-05-28 09:14:38 -05:00
Dave Collins
6c7f45fdb7 Add 2014 to copyright dates. 2014-01-08 23:44:08 -06:00
Dave Collins
562bde6902 Use byte literals in tests to make go vet happy.
The go vet command complains about untagged struct initializers when
defining a ShaHash directly.  This seems to be a limitation where go vet
does not exclude the warning for types which are a constant size byte array
like it does for normal constant size byte array definition.

This commit simply modifies the tests to use a constant definition cast to a
ShaHash to overcome the limitation of go vet.
2013-07-27 15:55:06 -05:00
Dave Collins
3d303feefb Add negative test for NewShaHash.
This commit adds a test to ensure NewShaHash fails as expected when the
passed buffer has too many bytes to be a valid sha hash.
2013-05-11 11:19:46 -05:00
Dave Collins
69b27dd5d3 Initial implementation. 2013-05-08 18:58:29 -05:00