Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseApprovalsTestSuite ¶
type BaseApprovalsTestSuite struct {
suite.Suite
ParentBlock *flow.Header // parent of sealing candidate
Block *flow.Header // candidate for sealing
IncorporatedBlock *flow.Header // block that incorporated result
VerID flow.Identifier // for convenience, node id of first verifier
Chunks flow.ChunkList // list of chunks of execution result
ChunksAssignment *chunks.Assignment
AuthorizedVerifiers map[flow.Identifier]*flow.Identity // map of authorized verifier identities for execution result
PublicKey *module.PublicKey // public key used to mock signature verifications
SigHasher hash.Hasher // used to verify signatures
IncorporatedResult *flow.IncorporatedResult
}
BaseApprovalsTestSuite is a base suite for testing approvals processing related functionality At nutshell generates mock data that can be used to create approvals and provides all needed data to validate those approvals for respected execution result.
func (*BaseApprovalsTestSuite) SetupTest ¶
func (s *BaseApprovalsTestSuite) SetupTest()
type BaseAssignmentCollectorTestSuite ¶
type BaseAssignmentCollectorTestSuite struct {
BaseApprovalsTestSuite
WorkerPool *workerpool.WorkerPool
Blocks map[flow.Identifier]*flow.Header
State *protocol.State
Snapshots map[flow.Identifier]*protocol.Snapshot
Headers *storage.Headers
Assigner *module.ChunkAssigner
SealsPL *mempool.IncorporatedResultSeals
Conduit *mocknetwork.Conduit
FinalizedAtHeight map[uint64]*flow.Header
IdentitiesCache map[flow.Identifier]map[flow.Identifier]*flow.Identity // helper map to store identities for given block
RequestTracker *approvals.RequestTracker
}
BaseAssignmentCollectorTestSuite is a base suite for testing assignment collectors, contains mocks for all classes that are used in base assignment collector and can be reused in different test suites.
func (*BaseAssignmentCollectorTestSuite) MarkFinalized ¶
func (s *BaseAssignmentCollectorTestSuite) MarkFinalized(block *flow.Header)
func (*BaseAssignmentCollectorTestSuite) SetupTest ¶
func (s *BaseAssignmentCollectorTestSuite) SetupTest()
func (*BaseAssignmentCollectorTestSuite) TearDownTest ¶
func (s *BaseAssignmentCollectorTestSuite) TearDownTest()
Click to show internal directories.
Click to hide internal directories.