sidechain

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DriverName      = "sqlite3"
	DBName          = "./sideChainCache.db"
	QueryHeightCode = 0
)
View Source
const (
	CreateSideChainTxsTable = `` /* 133-byte string literal not displayed */

)
View Source
const MaxSignalQueueLen = 5

Variables

This section is empty.

Functions

func HandleSignal

func HandleSignal(handler func())

Types

type DataStore

type DataStore interface {
	AddSideChainTx(transactionHash, genesisBlockAddress string) error
	HasSideChainTx(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) AddSideChainTx

func (store *DataStoreImpl) AddSideChainTx(transactionHash, genesisBlockAddress string) error

func (*DataStoreImpl) HasSideChainTx

func (store *DataStoreImpl) HasSideChainTx(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