mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
* wip: conversion of hotstuff from flow into Q-oriented model * bulk of tests * remaining non-integration tests * add integration test, adjust log interface, small tweaks * further adjustments, restore full pacemaker shape * add component lifecycle management+supervisor * further refinements * resolve timeout hanging * mostly finalized state for consensus * bulk of engine swap out * lifecycle-ify most types * wiring nearly complete, missing needed hooks for proposals * plugged in, vetting message validation paths * global consensus, plugged in and verified * app shard now wired in too * do not decode empty keys.yml (#456) * remove obsolete engine.maxFrames config parameter (#454) * default to Info log level unless debug is enabled (#453) * respect config's "logging" section params, remove obsolete single-file logging (#452) * Trivial code cleanup aiming to reduce Go compiler warnings (#451) * simplify range traversal * simplify channel read for single select case * delete rand.Seed() deprecated in Go 1.20 and no-op as of Go 1.24 * simplify range traversal * simplify channel read for single select case * remove redundant type from array * simplify range traversal * simplify channel read for single select case * RC slate * finalize 2.1.0.5 * Update comments in StrictMonotonicCounter Fix comment formatting and clarify description. --------- Co-authored-by: Black Swan <3999712+blacks1ne@users.noreply.github.com>
92 lines
3.8 KiB
Go
92 lines
3.8 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
consensus "source.quilibrium.com/quilibrium/monorepo/consensus"
|
|
|
|
models "source.quilibrium.com/quilibrium/monorepo/consensus/models"
|
|
|
|
time "time"
|
|
)
|
|
|
|
// ParticipantConsumer is an autogenerated mock type for the ParticipantConsumer type
|
|
type ParticipantConsumer[StateT models.Unique, VoteT models.Unique] struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// OnCurrentRankDetails provides a mock function with given fields: currentRank, finalizedRank, currentLeader
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnCurrentRankDetails(currentRank uint64, finalizedRank uint64, currentLeader models.Identity) {
|
|
_m.Called(currentRank, finalizedRank, currentLeader)
|
|
}
|
|
|
|
// OnEventProcessed provides a mock function with no fields
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnEventProcessed() {
|
|
_m.Called()
|
|
}
|
|
|
|
// OnLocalTimeout provides a mock function with given fields: currentRank
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnLocalTimeout(currentRank uint64) {
|
|
_m.Called(currentRank)
|
|
}
|
|
|
|
// OnPartialTimeoutCertificate provides a mock function with given fields: currentRank, partialTimeoutCertificate
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnPartialTimeoutCertificate(currentRank uint64, partialTimeoutCertificate *consensus.PartialTimeoutCertificateCreated) {
|
|
_m.Called(currentRank, partialTimeoutCertificate)
|
|
}
|
|
|
|
// OnQuorumCertificateTriggeredRankChange provides a mock function with given fields: oldRank, newRank, qc
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnQuorumCertificateTriggeredRankChange(oldRank uint64, newRank uint64, qc models.QuorumCertificate) {
|
|
_m.Called(oldRank, newRank, qc)
|
|
}
|
|
|
|
// OnRankChange provides a mock function with given fields: oldRank, newRank
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnRankChange(oldRank uint64, newRank uint64) {
|
|
_m.Called(oldRank, newRank)
|
|
}
|
|
|
|
// OnReceiveProposal provides a mock function with given fields: currentRank, proposal
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnReceiveProposal(currentRank uint64, proposal *models.SignedProposal[StateT, VoteT]) {
|
|
_m.Called(currentRank, proposal)
|
|
}
|
|
|
|
// OnReceiveQuorumCertificate provides a mock function with given fields: currentRank, qc
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnReceiveQuorumCertificate(currentRank uint64, qc models.QuorumCertificate) {
|
|
_m.Called(currentRank, qc)
|
|
}
|
|
|
|
// OnReceiveTimeoutCertificate provides a mock function with given fields: currentRank, tc
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnReceiveTimeoutCertificate(currentRank uint64, tc models.TimeoutCertificate) {
|
|
_m.Called(currentRank, tc)
|
|
}
|
|
|
|
// OnStart provides a mock function with given fields: currentRank
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnStart(currentRank uint64) {
|
|
_m.Called(currentRank)
|
|
}
|
|
|
|
// OnStartingTimeout provides a mock function with given fields: startTime, endTime
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnStartingTimeout(startTime time.Time, endTime time.Time) {
|
|
_m.Called(startTime, endTime)
|
|
}
|
|
|
|
// OnTimeoutCertificateTriggeredRankChange provides a mock function with given fields: oldRank, newRank, tc
|
|
func (_m *ParticipantConsumer[StateT, VoteT]) OnTimeoutCertificateTriggeredRankChange(oldRank uint64, newRank uint64, tc models.TimeoutCertificate) {
|
|
_m.Called(oldRank, newRank, tc)
|
|
}
|
|
|
|
// NewParticipantConsumer creates a new instance of ParticipantConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewParticipantConsumer[StateT models.Unique, VoteT models.Unique](t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ParticipantConsumer[StateT, VoteT] {
|
|
mock := &ParticipantConsumer[StateT, VoteT]{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|