tests

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MockSyncBlockPeriod = 10
	MockSyncTimePeriod  = 5 * time.Second
	MockId              = "test"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyBlock

type DummyBlock struct {
	Height uint64 `gorm:"unique"`
	Hash   string
}

func (DummyBlock) TableName

func (DummyBlock) TableName() string

type MockIndexer

type MockIndexer struct {
	BaseIndexer   *indexer.Indexer
	GenesisHeight uint64
	TipHeight     uint64
	// contains filtered or unexported fields
}

func NewMockIndexer

func NewMockIndexer(dbConn *gorm.DB, id string, tip, genesis uint64) *MockIndexer

func (*MockIndexer) MockGetMissingJobs added in v1.2.0

func (i *MockIndexer) MockGetMissingJobs() ([]WorkQueue.Job, error)

func (*MockIndexer) MockSyncToDB

func (i *MockIndexer) MockSyncToDB() db_buffer.SyncResult

func (*MockIndexer) MockSyncToDBWithExit added in v1.1.0

func (i *MockIndexer) MockSyncToDBWithExit() db_buffer.SyncResult

func (*MockIndexer) NewMockWorker

func (i *MockIndexer) NewMockWorker(id string, workerChannel chan chan WorkQueue.Job) WorkQueue.QueuedWorker

type MockWorker

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

func (*MockWorker) DoWork

func (m *MockWorker) DoWork(w WorkQueue.Job)

func (*MockWorker) Start

func (m *MockWorker) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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