db

package
v0.0.0-...-2287164 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: GPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PolyState       = []byte("poly")
	COSMOSState     = []byte("cosmos")
	CosmosReProve   = []byte("cosmos_reprove")
	PolyReProve     = []byte("poly_reprove")
	CosmosStatusKey = []byte("cosmos_status")
	PolyStatusKey   = []byte("poly_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) DelPolyTxReproving

func (db *Database) DelPolyTxReproving(txhash string) error

func (*Database) DelTxInCosmosStatus

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

func (*Database) DelTxInPolyStatus

func (db *Database) DelTxInPolyStatus(hash common.Uint256) error

func (*Database) GetCosmosHeight

func (db *Database) GetCosmosHeight() int64

func (*Database) GetCosmosTxReproving

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

func (*Database) GetPolyHeight

func (db *Database) GetPolyHeight() uint32

func (*Database) GetPolyTxReproving

func (db *Database) GetPolyTxReproving() ([]*PolyProofAndHeader, error)

func (*Database) LoadCosmosStatus

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

func (*Database) LoadPolyStatus

func (db *Database) LoadPolyStatus(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) SetPolyHeight

func (db *Database) SetPolyHeight(height uint32) error

func (*Database) SetPolyTxReproving

func (db *Database) SetPolyTxReproving(txhash, proof string, hdr *types.Header) error

func (*Database) SetPolyTxTxInChan

func (db *Database) SetPolyTxTxInChan(txhash string)

func (*Database) SetTxToCosmosStatus

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

func (*Database) SetTxToPolyStatus

func (db *Database) SetTxToPolyStatus(hash common.Uint256, rtx *coretypes.ResultTx) 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