coremock

package
v1.22.25 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package coremock provides mock implementations for core consensus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConsensus

type MockConsensus struct {
	// contains filtered or unexported fields
}

MockConsensus provides a mock implementation for consensus

func NewMockConsensus

func NewMockConsensus() *MockConsensus

NewMockConsensus creates a new mock consensus

func (*MockConsensus) Decide

func (m *MockConsensus) Decide(ctx context.Context, value int) error

Decide makes a consensus decision

func (*MockConsensus) IsDecided

func (m *MockConsensus) IsDecided() bool

IsDecided returns whether consensus has been reached

func (*MockConsensus) Result

func (m *MockConsensus) Result() int

Result returns the consensus result

Jump to

Keyboard shortcuts

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