Documentation ¶
Overview ¶
Package validate provides context-free consensus validation.
Index ¶
Constants ¶
const ( // DCP0005ActiveHeightTestNet3 is the height of activation for DCP0005 // in TestNet3. DCP0005ActiveHeightTestNet3 int32 = 323328 // DCP0005ActiveHeightMainNet is the height of activation for DCP0005 // in MainNet. DCP0005ActiveHeightMainNet int32 = 431488 )
Variables ¶
This section is empty.
Functions ¶
func CFilterV2HeaderCommitment ¶
func CFilterV2HeaderCommitment(net wire.CurrencyNet, header *wire.BlockHeader, filter *gcs.FilterV2, leafIndex uint32, proof []chainhash.Hash) error
CFilterV2HeaderCommitment ensures the given v2 committed filter has actually been committed to in the header, assuming dcp0005 was activated.
func DCP0005MerkleRoot ¶
DCP0005MerkleRoot recreates the combined regular and stake transaction merkle root and compares it against the merkle root in the block header.
DCP0005 (https://github.com/decred/dcps/blob/master/dcp-0005/dcp-0005.mediawiki) describes (among other changes) the hard forking change which combined the individual regular and stake merkle roots into a single root.
func MerkleRoots ¶
MerkleRoots recreates the merkle roots of regular and stake transactions from a block and compares them against the recorded merkle roots in the block header.
func PreDCP0005CFilterHash ¶
func PreDCP0005CFilterHash(net wire.CurrencyNet, cfsethash *chainhash.Hash) error
PreDCP0005CfilterHash returns nil if the hash for the given set of cf data matches the exepected hash for the given network.
Types ¶
This section is empty.