19eada0b4b
This replaces the ErrDoubleSpend and ErrMissingTx error codes with a single error code named ErrMissingTxOut and updates the relevant errors and expected test results accordingly. Once upon a time, the code relied on a transaction index, so it was able to definitively differentiate between a transaction output that legitimately did not exist and one that had already been spent. However, since the code now uses a pruned utxoset, it is no longer possible to reliably differentiate since once all outputs of a transaction are spent, it is removed from the utxoset completely. Consequently, a missing transaction could be either because the transaction never existed or because it is fully spent. |
||
---|---|---|
.. | ||
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 excerise the consensus validation rules.
Installation and Updating
$ go get -u github.com/btcsuite/btcd/blockchain/fullblocktests
License
Package fullblocktests is licensed under the copyfree ISC License.