Versions in this module Expand all Collapse all v0 v0.0.0 May 17, 2024 Changes in this version + var ErrInvalidBodyType = errors.New("invalid body type") + var ErrInvalidHeaderType = errors.New("invalid header type") + var ErrMiniBlockEmpty = errors.New("mini block is empty") + var ErrNilBlockBody = errors.New("nil block body") + var ErrNilCacher = errors.New("nil cacher") + var ErrNilHeadersDataPool = errors.New("nil headers data pool") + var ErrNilHeadersNoncesDataPool = errors.New("nil headers nonces cache") + var ErrNilMetaBlockPool = errors.New("nil meta block data pool") + var ErrNilMiniBlockHashesPool = errors.New("nil meta block mini block hashes data pool") + var ErrNilNonceConverter = errors.New("nil nonce converter") + var ErrNilPeerChangeBlockDataPool = errors.New("nil peer change block data pool") + var ErrNilShardHeaderPool = errors.New("nil meta block shard header data pool") + var ErrNilTxBlockDataPool = errors.New("nil tx block data pool") + var ErrNilTxDataPool = errors.New("nil transaction data pool") + var ErrWrongTypeAssertion = errors.New("wrong type assertion") + type BodyHandler interface + IntegrityAndValidity func() error + type CapnpHelper interface + Load func(r io.Reader) error + Save func(w io.Writer) error + type ChainHandler interface + GetCurrentBlockBody func() BodyHandler + GetCurrentBlockHeader func() HeaderHandler + GetCurrentBlockHeaderHash func() []byte + GetGenesisHeader func() HeaderHandler + GetGenesisHeaderHash func() []byte + GetLocalHeight func() int64 + GetNetworkHeight func() int64 + HasBadBlock func(blockHash []byte) bool + PutBadBlock func(blockHash []byte) + SetCurrentBlockBody func(body BodyHandler) error + SetCurrentBlockHeader func(bh HeaderHandler) error + SetCurrentBlockHeaderHash func(hash []byte) + SetGenesisHeader func(gb HeaderHandler) error + SetGenesisHeaderHash func(hash []byte) + SetLocalHeight func(height int64) + SetNetworkHeight func(height int64) + type HeaderHandler interface + GetEpoch func() uint32 + GetMiniBlockHeadersWithDst func(destId uint32) map[string]uint32 + GetMiniBlockProcessed func(hash []byte) bool + GetNonce func() uint64 + GetPrevHash func() []byte + GetPrevRandSeed func() []byte + GetPubKeysBitmap func() []byte + GetRandSeed func() []byte + GetRootHash func() []byte + GetRound func() uint32 + GetSignature func() []byte + GetTimeStamp func() uint64 + GetTxCount func() uint32 + SetEpoch func(e uint32) + SetMiniBlockProcessed func(hash []byte, processed bool) + SetNonce func(n uint64) + SetPrevHash func(pvHash []byte) + SetPrevRandSeed func(pvRandSeed []byte) + SetPubKeysBitmap func(pkbm []byte) + SetRandSeed func(randSeed []byte) + SetRootHash func(rHash []byte) + SetRound func(r uint32) + SetSignature func(sg []byte) + SetTimeStamp func(ts uint64) + SetTxCount func(txCount uint32)