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 ¶
type DataStoreImpl ¶
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
Click to show internal directories.
Click to hide internal directories.