context

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 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)
	QueryBlock(blkId []byte) (ledger.BlockHandle, error)
	QueryBlockByHeight(int64) (ledger.BlockHandle, error)
	GetTipBlock() ledger.BlockHandle
	GetTipXMSnapshotReader() (ledger.XMSnapshotReader, error)
	CreateSnapshot(blkId []byte) (ledger.XMReader, error)
	GetTipSnapshot() (ledger.XMReader, error)
}

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