blockcutter

package
v0.0.0-...-fbe82ab Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

type Receiver struct {
	//IsolatedTx导致有序返回[][]抑制匹配,[]newTx,设置为真时为假
	IsolatedTx bool

	//CutSeversales导致有序返回[]Curbatch,设置为true时为true
	CutAncestors bool

	//CutNext导致有序返回[]append(corbatch,newtx),设置为true时为false
	CutNext bool

	//SkipPendCurbatch导致命令跳过附加到Curbatch
	SkipAppendCurBatch bool

	//块是从有序返回之前读取的通道,它对同步很有用。
	//如果出于任何原因不希望同步,只需关闭通道
	Block chan struct{}
	// contains filtered or unexported fields
}

接收器模拟BlockCutter.Receiver接口

func NewReceiver

func NewReceiver() *Receiver

newReceiver返回模拟blockcutter.Receiver实现

func (*Receiver) CurBatch

func (mbc *Receiver) CurBatch() []*cb.Envelope

func (*Receiver) Cut

func (mbc *Receiver) Cut() []*cb.Envelope

CUT终止当前批,返回当前批

func (*Receiver) Ordered

func (mbc *Receiver) Ordered(env *cb.Envelope) ([][]*cb.Envelope, bool)

订单将根据收货方的状态添加或剪切批次,返回时阻止从块读取。

Jump to

Keyboard shortcuts

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