This modifies the PrivateKey type to be opaque and updates the internal implementation of it to use the new ModNScalar type instead of a big.Int. It also modifies NewPrivateKey to accept the new ModNScalar type instead of a big.Int and improves the PrivKeyFromBytes comment to explicitly call out the semantics that realistically already existed when using the value in calculations. It is also worth noting that there are still a couple of internal conversions to big.Int when dealing with signatures that are required since that code still relies on them for now. The goal is to eventually update them to use the more efficient specialized types and this change help facilitate that process. |
||
|---|---|---|
| .. | ||
| doc.go | ||
| generate.go | ||
| params.go | ||
| README.md | ||
fullblocktests
Package fullblocktests provides a set of full block tests to be used for testing the consensus validation rules. The tests are intended to be flexible enough to allow both unit-style tests directly against the blockchain code as well as integration style tests over the peer-to-peer network. To achieve that goal, each test contains additional information about the expected result, however that information can be ignored when doing comparison tests between two independent versions over the peer-to-peer network.
This package has intentionally been designed so it can be used as a standalone package for any projects needing to test their implementation against a full set of blocks that exercise the consensus validation rules.
Installation and Updating
$ go get -u github.com/decred/dcrd/blockchain/fullblocktests
License
Package fullblocktests is licensed under the copyfree ISC License.