context

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

明确定义该模块需要的上下文信息,方便代码阅读和理解

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address xaddress.Address

type BlockInterface

type BlockInterface ledger.BlockHandle

type ConsensusCtx

type ConsensusCtx struct {
	xctx.BaseCtx
	BcName   string
	Address  *Address
	Crypto   cryptoBase.CryptoClient
	Contract contract.Manager
	Ledger   LedgerRely
	Network  network.Network
}

ConsensusCtx共识运行环境上下文

type CryptoClient

type CryptoClient cryptoBase.CryptoClient

type LedgerRely

type LedgerRely interface {
	GetConsensusConf() ([]byte, error)
	QueryBlockHeader(blkId []byte) (ledger.BlockHandle, error)
	QueryBlockHeaderByHeight(int64) (ledger.BlockHandle, error)
	GetTipBlock() ledger.BlockHandle
	GetTipXMSnapshotReader() (ledger.XMSnapshotReader, error)
	CreateSnapshot(blkId []byte) (ledger.XMReader, error)
	GetTipSnapshot() (ledger.XMReader, error)
	QueryTipBlockHeader() ledger.BlockHandle
}

LedgerCtxInConsensus使用到的ledger接口

type P2pCtxInConsensus

type P2pCtxInConsensus network.Network

Jump to

Keyboard shortcuts

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