mocks

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepositPool

type DepositPool struct {
	mock.Mock
}

DepositPool is an autogenerated mock type for the DepositPool type

func (*DepositPool) Add

func (_m *DepositPool) Add(out *wire.OutPoint, height wire.BlockHeight, proof *merkle.MerklePath) error

Add provides a mock function with given fields: out, height, proof

func (*DepositPool) GetAll

func (_m *DepositPool) GetAll(_a0 shard.Index, address multivacaddress.Address) ([]*wire.OutWithProof, error)

GetAll provides a mock function with given fields: _a0, address

func (*DepositPool) GetBiggest

func (_m *DepositPool) GetBiggest(address multivacaddress.Address) ([]byte, error)

GetBiggest provides a mock function with given fields: address

func (*DepositPool) Lock

func (_m *DepositPool) Lock(out *wire.OutPoint) error

Lock provides a mock function with given fields: out

func (*DepositPool) Remove

func (_m *DepositPool) Remove(out *wire.OutPoint) error

Remove provides a mock function with given fields: out

func (*DepositPool) Update

func (_m *DepositPool) Update(update *state.Update, _a1 shard.Index, height wire.BlockHeight) error

Update provides a mock function with given fields: update, _a1, height

func (*DepositPool) Verify

func (_m *DepositPool) Verify(address multivacaddress.Address, proof []byte) bool

Verify provides a mock function with given fields: address, proof

type FakeTicker

type FakeTicker struct {
	C       chan time.Time
	Stopped bool
}

FakeTicker for easier testing.

func (*FakeTicker) Chan

func (ft *FakeTicker) Chan() <-chan time.Time

Chan implement ticker interface

func (*FakeTicker) Stop

func (ft *FakeTicker) Stop()

Stop implement ticker interface

func (*FakeTicker) Tick

func (ft *FakeTicker) Tick()

Tick sends the tick time to the ticker channel after every period. Tick events are discarded if the underlying ticker channel does not have enough capacity.

type MockBroadCaster

type MockBroadCaster struct {
	Count int
}

MockBroadCaster is a mock broadcaster.

func NewMockBroadCaster

func NewMockBroadCaster() *MockBroadCaster

NewMockBroadCaster mocks a broadcaster.

func (*MockBroadCaster) BroadcastMessage

func (mbc *MockBroadCaster) BroadcastMessage(msg wire.Message, params *connection.BroadcastParams)

BroadcastMessage mock a broadcast action.

func (*MockBroadCaster) HandleMessage

func (mbc *MockBroadCaster) HandleMessage(message wire.Message)

HandleMessage is a mock method.

func (*MockBroadCaster) RegisterChannels

func (mbc *MockBroadCaster) RegisterChannels(dispatch *connection.MessagesAndReceiver)

RegisterChannels is a mock method.

Jump to

Keyboard shortcuts

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