lnmock

package
v0.18.3-beta.rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

NOTE: forcetypeassert is skipped for the mock because the test would fail if the returned value doesn't match the type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockOnion

func MockOnion() [lnwire.OnionPacketSize]byte

MockOnion returns a mock onion payload.

Types

type MockChain

type MockChain struct {
	mock.Mock
}

MockChain is a mock implementation of the Chain interface.

func (*MockChain) BackEnd

func (m *MockChain) BackEnd() string

func (*MockChain) BlockStamp

func (m *MockChain) BlockStamp() (*waddrmgr.BlockStamp, error)

func (*MockChain) FilterBlocks

func (*MockChain) GetBestBlock

func (m *MockChain) GetBestBlock() (*chainhash.Hash, int32, error)

func (*MockChain) GetBlock

func (m *MockChain) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error)

func (*MockChain) GetBlockHash

func (m *MockChain) GetBlockHash(height int64) (*chainhash.Hash, error)

func (*MockChain) GetBlockHeader

func (m *MockChain) GetBlockHeader(hash *chainhash.Hash) (
	*wire.BlockHeader, error)

func (*MockChain) IsCurrent

func (m *MockChain) IsCurrent() bool

func (*MockChain) MapRPCErr

func (m *MockChain) MapRPCErr(err error) error

func (*MockChain) Notifications

func (m *MockChain) Notifications() <-chan interface{}

func (*MockChain) NotifyBlocks

func (m *MockChain) NotifyBlocks() error

func (*MockChain) NotifyReceived

func (m *MockChain) NotifyReceived(addrs []btcutil.Address) error

func (*MockChain) Rescan

func (m *MockChain) Rescan(startHash *chainhash.Hash, addrs []btcutil.Address,
	outPoints map[wire.OutPoint]btcutil.Address) error

func (*MockChain) SendRawTransaction

func (m *MockChain) SendRawTransaction(tx *wire.MsgTx, allowHighFees bool) (
	*chainhash.Hash, error)

func (*MockChain) Start

func (m *MockChain) Start() error

func (*MockChain) Stop

func (m *MockChain) Stop()

func (*MockChain) TestMempoolAccept

func (m *MockChain) TestMempoolAccept(txns []*wire.MsgTx, maxFeeRate float64) (
	[]*btcjson.TestMempoolAcceptResult, error)

func (*MockChain) WaitForShutdown

func (m *MockChain) WaitForShutdown()

type MockClock

type MockClock struct {
	mock.Mock
}

MockClock implements the `clock.Clock` interface.

func (*MockClock) Now

func (m *MockClock) Now() time.Time

func (*MockClock) TickAfter

func (m *MockClock) TickAfter(d time.Duration) <-chan time.Time

Jump to

Keyboard shortcuts

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