internal

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 8 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 {
	Num uint64
	Txs []*Transaction
}

块用于将信息从其原始格式保存到结构中。 更适合/更友好地进行验证

type PubAndHashUpdates

type PubAndHashUpdates struct {
	PubUpdates  *privacyenabledstate.PubUpdateBatch
	HashUpdates *privacyenabledstate.HashedUpdateBatch
}

pubandhashupdates封装公共和哈希更新。用于保存更新的预期用途 将作为块提交的结果应用于statedb

func NewPubAndHashUpdates

func NewPubAndHashUpdates() *PubAndHashUpdates

NewPubandHashUpdates构造空的PubandHashUpdates

func (*PubAndHashUpdates) ApplyWriteSet

func (u *PubAndHashUpdates) ApplyWriteSet(txRWSet *rwsetutil.TxRwSet, txHeight *version.Height, db privacyenabledstate.DB) error

applyWriteset向pubandhashupdates添加(或删除)写入集中存在的键/值

type Transaction

type Transaction struct {
	IndexInBlock   int
	ID             string
	RWSet          *rwsetutil.TxRwSet
	ValidationCode peer.TxValidationCode
}

事务用于将信息从其协议格式保存到结构中。 更适合/更友好地进行验证

func (*Transaction) ContainsPvtWrites

func (t *Transaction) ContainsPvtWrites() bool

如果此事务不限于仅影响公共数据,则containsPvTwrites返回true

func (*Transaction) RetrieveHash

func (t *Transaction) RetrieveHash(ns string, coll string) []byte

RetrieveHash返回存在的私有写入集的哈希值 在给定命名空间集合的公共数据中

type Validator

type Validator interface {
	ValidateAndPrepareBatch(block *Block, doMVCCValidation bool) (*PubAndHashUpdates, error)
}

验证程序应该基于块中存在的公共数据和哈希来验证事务。 并返回一个应用于更新状态的批

Jump to

Keyboard shortcuts

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