Documentation
¶
Index ¶
- func NewEmptyNotarization(nodes []bft.NodeID, round uint64, seq uint64) *bft.EmptyNotarization
- func NewFinalizationRecord(t *testing.T, logger bft.Logger, signatureAggregator bft.SignatureAggregator, ...) (bft.Finalization, []byte)
- func NewNotarization(logger bft.Logger, signatureAggregator bft.SignatureAggregator, ...) (bft.Notarization, error)
- func NewNotarizationRecord(logger bft.Logger, signatureAggregator bft.SignatureAggregator, ...) ([]byte, error)
- func NewTestFinalizeVote(t *testing.T, block bft.VerifiedBlock, id bft.NodeID) *bft.FinalizeVote
- func NewTestVote(block AnyBlock, id bft.NodeID) (*bft.Vote, error)
- type AnyBlock
- type BlockDeserializer
- type EncodedTestBlock
- type TestBlock
- type TestLogger
- type TestQC
- type TestSignatureAggregator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmptyNotarization ¶ added in v0.1.1
NewEmptyNotarization creates a new empty notarization
func NewFinalizationRecord ¶ added in v0.1.1
func NewFinalizationRecord(t *testing.T, logger bft.Logger, signatureAggregator bft.SignatureAggregator, block bft.VerifiedBlock, ids []bft.NodeID) (bft.Finalization, []byte)
creates a new finalization
func NewNotarization ¶ added in v0.1.1
func NewNotarization(logger bft.Logger, signatureAggregator bft.SignatureAggregator, block bft.VerifiedBlock, ids []bft.NodeID) (bft.Notarization, error)
func NewNotarizationRecord ¶ added in v0.1.1
func NewNotarizationRecord(logger bft.Logger, signatureAggregator bft.SignatureAggregator, block bft.VerifiedBlock, ids []bft.NodeID) ([]byte, error)
func NewTestFinalizeVote ¶ added in v0.1.1
func NewTestFinalizeVote(t *testing.T, block bft.VerifiedBlock, id bft.NodeID) *bft.FinalizeVote
Types ¶
type AnyBlock ¶ added in v0.1.1
type AnyBlock interface {
// BlockHeader encodes a succinct and collision-free representation of a block.
BlockHeader() bft.BlockHeader
}
type BlockDeserializer ¶ added in v0.1.1
type BlockDeserializer struct {
// DelayedVerification will block verifying any deserialized blocks until we send to the channel
DelayedVerification chan struct{}
}
func (*BlockDeserializer) DeserializeBlock ¶ added in v0.1.1
type EncodedTestBlock ¶ added in v0.1.1
type TestBlock ¶ added in v0.1.1
type TestBlock struct {
Data []byte
Metadata bft.ProtocolMetadata
Digest [32]byte
OnVerify func()
VerificationDelay chan struct{}
VerificationError error
// contains filtered or unexported fields
}
func NewTestBlock ¶ added in v0.1.1
func NewTestBlock(metadata bft.ProtocolMetadata, blacklist bft.Blacklist) *TestBlock
func (*TestBlock) BlockHeader ¶ added in v0.1.1
func (t *TestBlock) BlockHeader() bft.BlockHeader
func (*TestBlock) ComputeDigest ¶ added in v0.1.1
func (tb *TestBlock) ComputeDigest()
type TestLogger ¶
func MakeLogger ¶
func MakeLogger(t *testing.T, node ...int) *TestLogger
func (*TestLogger) Silence ¶
func (t *TestLogger) Silence()
type TestSignatureAggregator ¶ added in v0.1.1
type TestSignatureAggregator struct {
Err error
}
func (*TestSignatureAggregator) Aggregate ¶ added in v0.1.1
func (t *TestSignatureAggregator) Aggregate(signatures []bft.Signature) (bft.QuorumCertificate, error)
Click to show internal directories.
Click to hide internal directories.