mainchain

package
v0.0.0-...-fe8a655 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName      = "sqlite3"
	DBName          = "./mainChainCache.db"
	QueryHeightCode = 0
)
View Source
const (
	CreateMainChainTxsTable = `CREATE TABLE IF NOT EXISTS MainChainTxs (
				TransactionHash VARCHAR NOT NULL PRIMARY KEY
			);`
)
View Source
const MaxSignalQueueLen = 5

Variables

This section is empty.

Functions

func HandleSignal

func HandleSignal(handler func())

Types

type DataStore

type DataStore interface {
	AddMainChainTx(transactionHash string) error
	HasMainChainTx(transactionHash string) (bool, error)

	ResetDataStore() error
}
var (
	DbCache DataStore
)

func OpenDataStore

func OpenDataStore() (DataStore, error)

type DataStoreImpl

type DataStoreImpl struct {
	*sql.DB
	// contains filtered or unexported fields
}

func (*DataStoreImpl) AddMainChainTx

func (store *DataStoreImpl) AddMainChainTx(transactionHash string) error

func (*DataStoreImpl) HasMainChainTx

func (store *DataStoreImpl) HasMainChainTx(transactionHash string) (bool, error)

func (*DataStoreImpl) ResetDataStore

func (store *DataStoreImpl) ResetDataStore() error

type SignalMap

type SignalMap map[os.Signal]func()

Jump to

Keyboard shortcuts

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