lbcd/blockchain/fullblocktests
Dave Collins 9cdc1b8afd
blockchain: Remove isMajorityVersion code.
Now that all softforking is done via BIP0009 versionbits, replace the
old isMajorityVersion deployment mechanism with hard coded historical
block heights at which they became active.

Since the activation heights vary per network, this adds new parameters
to the chaincfg.Params struct for them and sets the correct heights at
which each softfork became active on each chain.

It should be noted that this is a technically hard fork since the
behavior of alternate chain history is different with these hard-coded
activation heights as opposed to the old isMajorityVersion code.  In
particular, an alternate chain history could activate one of the soft
forks earlier than these hard-coded heights which means the old code
would reject blocks which violate the new soft fork rules whereas this
new code would not.

However, all of the soft forks this refers to were activated so far in
the chain history there is there is no way a reorg that long could
happen and checkpoints reject alternate chains before the most recent
checkpoint anyways.  Furthermore, the same change was made in Bitcoin
Core so this needs to be changed to be consistent anyways.
2016-11-30 14:26:13 -06:00
..
doc.go fullblocktests: Add missing doc.go file. 2016-10-23 13:31:26 -05:00
generate.go wire: Make NewMsgTx accept the tx version. 2016-10-27 14:09:29 -05:00
params.go blockchain: Remove isMajorityVersion code. 2016-11-30 14:26:13 -06:00
README.md blockchain: Add block validation infrastructure. 2016-10-17 12:16:53 -05:00

fullblocktests

[Build Status] (https://travis-ci.org/btcsuite/btcd) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [GoDoc] (http://godoc.org/github.com/btcsuite/btcd/blockchain/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.