// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/ChainSafe/gossamer/lib/grandpa (interfaces: GrandpaState,Network)
//
// Generated by this command:
//
//	mockgen -destination=mocks_test.go -package grandpa . GrandpaState,Network
//

// Package grandpa is a generated GoMock package.
package grandpa

import (
	reflect "reflect"

	network "github.com/ChainSafe/gossamer/dot/network"
	types "github.com/ChainSafe/gossamer/dot/types"
	common "github.com/ChainSafe/gossamer/lib/common"
	peer "github.com/libp2p/go-libp2p/core/peer"
	protocol "github.com/libp2p/go-libp2p/core/protocol"
	gomock "go.uber.org/mock/gomock"
)

// MockGrandpaState is a mock of GrandpaState interface.
type MockGrandpaState struct {
	ctrl     *gomock.Controller
	recorder *MockGrandpaStateMockRecorder
	isgomock struct{}
}

// MockGrandpaStateMockRecorder is the mock recorder for MockGrandpaState.
type MockGrandpaStateMockRecorder struct {
	mock *MockGrandpaState
}

// NewMockGrandpaState creates a new mock instance.
func NewMockGrandpaState(ctrl *gomock.Controller) *MockGrandpaState {
	mock := &MockGrandpaState{ctrl: ctrl}
	mock.recorder = &MockGrandpaStateMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGrandpaState) EXPECT() *MockGrandpaStateMockRecorder {
	return m.recorder
}

// GetAuthorities mocks base method.
func (m *MockGrandpaState) GetAuthorities(setID uint64) ([]types.GrandpaVoter, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthorities", setID)
	ret0, _ := ret[0].([]types.GrandpaVoter)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetAuthorities indicates an expected call of GetAuthorities.
func (mr *MockGrandpaStateMockRecorder) GetAuthorities(setID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthorities", reflect.TypeOf((*MockGrandpaState)(nil).GetAuthorities), setID)
}

// GetAuthoritiesChangesFromBlock mocks base method.
func (m *MockGrandpaState) GetAuthoritiesChangesFromBlock(blockNumber uint) ([]uint, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthoritiesChangesFromBlock", blockNumber)
	ret0, _ := ret[0].([]uint)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetAuthoritiesChangesFromBlock indicates an expected call of GetAuthoritiesChangesFromBlock.
func (mr *MockGrandpaStateMockRecorder) GetAuthoritiesChangesFromBlock(blockNumber any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthoritiesChangesFromBlock", reflect.TypeOf((*MockGrandpaState)(nil).GetAuthoritiesChangesFromBlock), blockNumber)
}

// GetCurrentSetID mocks base method.
func (m *MockGrandpaState) GetCurrentSetID() (uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetCurrentSetID")
	ret0, _ := ret[0].(uint64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetCurrentSetID indicates an expected call of GetCurrentSetID.
func (mr *MockGrandpaStateMockRecorder) GetCurrentSetID() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentSetID", reflect.TypeOf((*MockGrandpaState)(nil).GetCurrentSetID))
}

// GetLatestRound mocks base method.
func (m *MockGrandpaState) GetLatestRound() (uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetLatestRound")
	ret0, _ := ret[0].(uint64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetLatestRound indicates an expected call of GetLatestRound.
func (mr *MockGrandpaStateMockRecorder) GetLatestRound() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestRound", reflect.TypeOf((*MockGrandpaState)(nil).GetLatestRound))
}

// GetPrecommits mocks base method.
func (m *MockGrandpaState) GetPrecommits(round, setID uint64) ([]SignedVote, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetPrecommits", round, setID)
	ret0, _ := ret[0].([]SignedVote)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetPrecommits indicates an expected call of GetPrecommits.
func (mr *MockGrandpaStateMockRecorder) GetPrecommits(round, setID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrecommits", reflect.TypeOf((*MockGrandpaState)(nil).GetPrecommits), round, setID)
}

// GetPrevotes mocks base method.
func (m *MockGrandpaState) GetPrevotes(round, setID uint64) ([]SignedVote, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetPrevotes", round, setID)
	ret0, _ := ret[0].([]SignedVote)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetPrevotes indicates an expected call of GetPrevotes.
func (mr *MockGrandpaStateMockRecorder) GetPrevotes(round, setID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrevotes", reflect.TypeOf((*MockGrandpaState)(nil).GetPrevotes), round, setID)
}

// GetSetIDByBlockNumber mocks base method.
func (m *MockGrandpaState) GetSetIDByBlockNumber(num uint) (uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetSetIDByBlockNumber", num)
	ret0, _ := ret[0].(uint64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetSetIDByBlockNumber indicates an expected call of GetSetIDByBlockNumber.
func (mr *MockGrandpaStateMockRecorder) GetSetIDByBlockNumber(num any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSetIDByBlockNumber", reflect.TypeOf((*MockGrandpaState)(nil).GetSetIDByBlockNumber), num)
}

// NextGrandpaAuthorityChange mocks base method.
func (m *MockGrandpaState) NextGrandpaAuthorityChange(bestBlockHash common.Hash, bestBlockNumber uint) (uint, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "NextGrandpaAuthorityChange", bestBlockHash, bestBlockNumber)
	ret0, _ := ret[0].(uint)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// NextGrandpaAuthorityChange indicates an expected call of NextGrandpaAuthorityChange.
func (mr *MockGrandpaStateMockRecorder) NextGrandpaAuthorityChange(bestBlockHash, bestBlockNumber any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextGrandpaAuthorityChange", reflect.TypeOf((*MockGrandpaState)(nil).NextGrandpaAuthorityChange), bestBlockHash, bestBlockNumber)
}

// SetLatestRound mocks base method.
func (m *MockGrandpaState) SetLatestRound(round uint64) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetLatestRound", round)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetLatestRound indicates an expected call of SetLatestRound.
func (mr *MockGrandpaStateMockRecorder) SetLatestRound(round any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLatestRound", reflect.TypeOf((*MockGrandpaState)(nil).SetLatestRound), round)
}

// SetPrecommits mocks base method.
func (m *MockGrandpaState) SetPrecommits(round, setID uint64, data []SignedVote) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetPrecommits", round, setID, data)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetPrecommits indicates an expected call of SetPrecommits.
func (mr *MockGrandpaStateMockRecorder) SetPrecommits(round, setID, data any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPrecommits", reflect.TypeOf((*MockGrandpaState)(nil).SetPrecommits), round, setID, data)
}

// SetPrevotes mocks base method.
func (m *MockGrandpaState) SetPrevotes(round, setID uint64, data []SignedVote) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetPrevotes", round, setID, data)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetPrevotes indicates an expected call of SetPrevotes.
func (mr *MockGrandpaStateMockRecorder) SetPrevotes(round, setID, data any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPrevotes", reflect.TypeOf((*MockGrandpaState)(nil).SetPrevotes), round, setID, data)
}

// MockNetwork is a mock of Network interface.
type MockNetwork struct {
	ctrl     *gomock.Controller
	recorder *MockNetworkMockRecorder
	isgomock struct{}
}

// MockNetworkMockRecorder is the mock recorder for MockNetwork.
type MockNetworkMockRecorder struct {
	mock *MockNetwork
}

// NewMockNetwork creates a new mock instance.
func NewMockNetwork(ctrl *gomock.Controller) *MockNetwork {
	mock := &MockNetwork{ctrl: ctrl}
	mock.recorder = &MockNetworkMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder {
	return m.recorder
}

// GossipMessage mocks base method.
func (m *MockNetwork) GossipMessage(msg network.NotificationsMessage) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "GossipMessage", msg)
}

// GossipMessage indicates an expected call of GossipMessage.
func (mr *MockNetworkMockRecorder) GossipMessage(msg any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GossipMessage", reflect.TypeOf((*MockNetwork)(nil).GossipMessage), msg)
}

// RegisterNotificationsProtocol mocks base method.
func (m *MockNetwork) RegisterNotificationsProtocol(sub protocol.ID, messageID network.MessageType, handshakeGetter network.HandshakeGetter, handshakeDecoder network.HandshakeDecoder, handshakeValidator network.HandshakeValidator, messageDecoder network.MessageDecoder, messageHandler network.NotificationsMessageHandler, batchHandler network.NotificationsMessageBatchHandler, maxSize uint64) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RegisterNotificationsProtocol", sub, messageID, handshakeGetter, handshakeDecoder, handshakeValidator, messageDecoder, messageHandler, batchHandler, maxSize)
	ret0, _ := ret[0].(error)
	return ret0
}

// RegisterNotificationsProtocol indicates an expected call of RegisterNotificationsProtocol.
func (mr *MockNetworkMockRecorder) RegisterNotificationsProtocol(sub, messageID, handshakeGetter, handshakeDecoder, handshakeValidator, messageDecoder, messageHandler, batchHandler, maxSize any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterNotificationsProtocol", reflect.TypeOf((*MockNetwork)(nil).RegisterNotificationsProtocol), sub, messageID, handshakeGetter, handshakeDecoder, handshakeValidator, messageDecoder, messageHandler, batchHandler, maxSize)
}

// SendMessage mocks base method.
func (m *MockNetwork) SendMessage(to peer.ID, msg NotificationsMessage) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendMessage", to, msg)
	ret0, _ := ret[0].(error)
	return ret0
}

// SendMessage indicates an expected call of SendMessage.
func (mr *MockNetworkMockRecorder) SendMessage(to, msg any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockNetwork)(nil).SendMessage), to, msg)
}
