client

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	BlockID tmtypes.BlockID `json:"block_id"`
	Block   *tmtypes.Block  `json:"block"`
}

type Client

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

func NewClient

func NewClient(ctx context.Context, coins config.Tokens, version int, rpcRemote string, mgr *datamanager.DataManager, startHeight int64) (*Client, error)

func (*Client) DecodeTxAppBatch

func (cli *Client) DecodeTxAppBatch(tx *types.TxBatch, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxAppEvm

func (cli *Client) DecodeTxAppEvm(tx *types.TxEvm, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxManage

func (cli *Client) DecodeTxManage(tx *types.TxManage, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxMultisigEvm

func (cli *Client) DecodeTxMultisigEvm(tx *types.MultisigEvmTx, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxNodeDelegate

func (cli *Client) DecodeTxNodeDelegate(tx *types.TxNodeDelegate, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxParams

func (cli *Client) DecodeTxParams(tx *types.TxParams, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) DecodeTxUserDelegate

func (cli *Client) DecodeTxUserDelegate(tx *types.TxUserDelegate, block *tmtypes.Block, deliverResult *abcitypes.ResponseDeliverTx,
	ledger *database.V3Ledger) (*database.V3Transaction, []database.V3Payment)

func (*Client) GetCurrentHeightV3

func (cli *Client) GetCurrentHeightV3() (int64, error)

func (*Client) GetV3BlockData

func (cli *Client) GetV3BlockData(height int64) (*V3BlockData, error)

func (*Client) LastBlockHeight

func (cli *Client) LastBlockHeight() (height int64, err error)

func (Client) SaveV3Data

func (cli Client) SaveV3Data(data *V3BlockData) error

func (*Client) Start

func (cli *Client) Start()

Start 保存获取到的数据,手动开启

type DefaultFetcher

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

DefaultFetcher Fetcher impl

func NewFetch

func NewFetch(rpcRemote string) *DefaultFetcher

func (*DefaultFetcher) FetchBlockInfo

func (f *DefaultFetcher) FetchBlockInfo(height int64) (*Block, error)

FetchBlockInfo 获取区块信息

func (*DefaultFetcher) FetchBlockResultInfo

func (f *DefaultFetcher) FetchBlockResultInfo(height int64) ([]*abcitypes.ResponseDeliverTx, error)

func (*DefaultFetcher) LastBlockHeight

func (f *DefaultFetcher) LastBlockHeight() (int64, error)

type Fetcher

type Fetcher interface {
	LastBlockHeight() (int64, error)
	FetchBlockInfo(height int64) (*Block, error)
	FetchBlockResultInfo(height int64) ([]*abcitypes.ResponseDeliverTx, error)
}

Fetcher

type V3BlockData

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

Jump to

Keyboard shortcuts

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