share

package
v0.0.0-...-0b52aac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodingTest

type EncodingTest struct {
	Name         string
	Data         []byte
	ExpectedRoot [32]byte
}

func Encoding

func Encoding() *EncodingTest

Encoding tests encoding of a ssv message

func (*EncodingTest) Run

func (test *EncodingTest) Run(t *testing.T)

func (*EncodingTest) TestName

func (test *EncodingTest) TestName() string

type ShareTest

type ShareTest struct {
	Name                     string
	Share                    types.Share
	Message                  qbft.SignedMessage
	ExpectedHasPartialQuorum bool
	ExpectedHasQuorum        bool
	ExpectedFullCommittee    bool
	ExpectedError            string
}

func HasPartialQuorumButNoQuorum

func HasPartialQuorumButNoQuorum() *ShareTest

HasPartialQuorumButNoQuorum tests msg with unique f+1 signers

func HasQuorum

func HasQuorum() *ShareTest

HasQuorum tests msg with unique 2f+1 signers

func HasQuorum3f1

func HasQuorum3f1() *ShareTest

HasQuorum3f1 tests msg with unique 3f+1 signers

func NoPartialQuorum

func NoPartialQuorum() *ShareTest

NoPartialQuorum tests msg with < unique f+1 signers

func NoPartialQuorumDuplicate

func NoPartialQuorumDuplicate() *ShareTest

NoPartialQuorumDuplicate tests msg with < unique f+1 signers (but f+1 signers including duplicates)

func NoQuorumDuplicate

func NoQuorumDuplicate() *ShareTest

NoQuorumDuplicate tests msg with < unique 2f+1 signers (but 2f+1 signers including duplicates)

func PartialQuorumWithDuplicate

func PartialQuorumWithDuplicate() *ShareTest

PartialQuorumWithDuplicate tests msg with unique f+1 signers (but also including duplicates)

func QuorumWithDuplicate

func QuorumWithDuplicate() *ShareTest

QuorumWithDuplicate tests msg with unique 2f+1 signers (but also including duplicates)

func (*ShareTest) GetUniqueMessageSignersCount

func (test *ShareTest) GetUniqueMessageSignersCount() int

Returns the number of unique signers in the message signers list

func (*ShareTest) Run

func (test *ShareTest) Run(t *testing.T)

func (*ShareTest) TestName

func (test *ShareTest) TestName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL