db

package
v0.0.0-...-c33422d Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	COSMOSState     = []byte("cosmos")
	CosmosReProve   = []byte("cosmos_reprove")
	CosmosStatusKey = []byte("cosmos_status")
)

Functions

This section is empty.

Types

type Database

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

func NewDatabase

func NewDatabase(dbPath string, cdc *codec.Codec) (*Database, error)

func (*Database) DelCosmosTxReproving

func (db *Database) DelCosmosTxReproving(hash tb.HexBytes) error

func (*Database) DelTxInCosmosStatus

func (db *Database) DelTxInCosmosStatus(hash tb.HexBytes) error

func (*Database) GetCosmosHeight

func (db *Database) GetCosmosHeight() int64

func (*Database) GetCosmosTxReproving

func (db *Database) GetCosmosTxReproving() ([]*coretypes.ResultTx, error)

func (*Database) LoadCosmosStatus

func (db *Database) LoadCosmosStatus(m *sync.Map) (int, error)

func (*Database) SetCosmosHeight

func (db *Database) SetCosmosHeight(height int64) error

func (*Database) SetCosmosTxReproving

func (db *Database) SetCosmosTxReproving(rTx *coretypes.ResultTx) error

func (*Database) SetCosmosTxTxInChan

func (db *Database) SetCosmosTxTxInChan(hash tb.HexBytes)

func (*Database) SetTxToCosmosStatus

func (db *Database) SetTxToCosmosStatus(hash tb.HexBytes, pph *PolyProofAndHeader) error

type PolyProofAndHeader

type PolyProofAndHeader struct {
	Txhash      string
	Proof       string
	Hdr         *types.Header
	CCID        []byte
	FromChainId uint64
}

func (*PolyProofAndHeader) Deserialize

func (pph *PolyProofAndHeader) Deserialize(raw []byte) error

func (*PolyProofAndHeader) Serialize

func (pph *PolyProofAndHeader) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

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