Documentation
¶
Overview ¶
Package vectors generates the golden vectors under testdata/vectors from the logrec codec. Every input is fixed, so a run writes the same bytes every time; TestVectors regenerates them and compares byte for byte.
Index ¶
Constants ¶
const OtherStream = "example_app_hdjvnwpxle"
OtherStream shares Stream's readable part under another suffix: a different stream, and a different topic.
const Stream = "example_app_qzxkvbmwtr"
Stream is the vectors' stream identifier: the readable part "example_app" and a fixed example suffix. A real stream draws its suffix at random (logrec.NewStream); a vector fixes one so it is reproducible.
Variables ¶
var FixedKey = bytes.Repeat([]byte{0x42}, 32)
FixedKey is the test key: 32 bytes of 0x42. It is public and must never hold anything real.
var OtherKey = bytes.Repeat([]byte{0x43}, 32)
OtherKey is a second test key, 32 bytes of 0x43, for producer-policy and other-producer cases. Public, never for real use.
Functions ¶
Types ¶
type Headers ¶
Headers is the test chain's block headers: a merkle root per height. It is the chain tracker the vectors are admitted against.
func (Headers) CurrentHeight ¶
CurrentHeight is the highest height held.