Versions in this module Expand all Collapse all v0 v0.5.3 Jun 14, 2019 v0.5.2 Jun 6, 2019 v0.5.1 May 25, 2019 v0.5.0 May 23, 2019 Changes in this version + const COMMITTABLE_UNDECIDED + const ROUND_UNDECIDED + const VidStrStart + var HASH0 = [common.HashLength]byte + type DropEvent struct + type Event struct + Body *EventBody + func NewEvent(vid string, height uint64, sequenceNumber uint64) *Event + func NewPulse() *Event + func (e *Event) AddParents(parents []*Event) + func (e *Event) AddSelfParent(selfParent *Event) + func (e *Event) AddTransactions(txs []common.Hash) + func (e *Event) Hash() common.Hash + func (e *Event) Marshal() []byte + func (e *Event) RecoverPublicKey(signer crypto.Signer) ([]byte, error) + func (e *Event) Sign(signer crypto.Signer) error + func (e *Event) SignVerify(publicKey []byte, signer crypto.Signer) bool + func (e *Event) Unmarshal(data []byte) + type EventBody struct + E []common.Hash + H uint64 + N uint64 + P bool + T int64 + Tx []common.Hash + func (eb *EventBody) EmptyLength() int + func (eb *EventBody) Hash() common.Hash + func (eb *EventBody) Marshal() ([]byte, error) + func (eb *EventBody) MarshalLength() int + func (eb *EventBody) MarshalTo(buf []byte) error + func (eb *EventBody) Unmarshal(data []byte) error + type EventMessage struct + Body *EventBody + Signature *crypto.Signature + func (em *EventMessage) Marshal() []byte + func (em *EventMessage) Unmarshal(data []byte) error + type ICore interface + AddressFromPublicKey func(publicKey []byte) ([]byte, error) + GetMinerSigner func() (crypto.Signer, error) + GetPrivateKeyOfDefaultAccount func() ([]byte, error) + type Metrics struct + EventIn uint64 + EventOut uint64 + EventRequest uint64 + ParentEventIn uint64 + TrafficIn uint64 + TrafficOut uint64 + TxIn uint64 + func NewMetrics() *Metrics + func (m *Metrics) AddEventIn(num uint64) + func (m *Metrics) AddEventOut(num uint64) + func (m *Metrics) AddEventRequest(num uint64) + func (m *Metrics) AddParentEventIn(num uint64) + func (m *Metrics) AddTrafficIn(traffic uint64) + func (m *Metrics) AddTrafficOut(traffic uint64) + func (m *Metrics) AddTxIn(num uint64) + type Params struct + type SealEvent struct + type SyncRequest struct + type Tetris struct + DropCh chan *DropEvent + EventCh chan []byte + Metrics *Metrics + OutputCh chan *consensus.Output + ParentEventCh chan []byte + RequestEventCh chan common.Hash + SealCh chan *SealEvent + SendEventCh chan []byte + TxsCh chan common.Hash + func NewTetris(core ICore, vid string, validatorList []string, blockHeight uint64) (*Tetris, error) + func (t *Tetris) ChanEventReq() <-chan common.Hash + func (t *Tetris) ChanEventSend() <-chan []byte + func (t *Tetris) DebugPrint() + func (t *Tetris) DebugPrintDetail() + func (t *Tetris) MajorityBeatReceived() bool + func (t *Tetris) MajorityBeatTime() (ok bool, duration time.Duration) + func (t *Tetris) OnTxDropped(txs []common.Hash) + func (t *Tetris) OnTxSealed(height uint64, txs []common.Hash) + func (t *Tetris) Output() <-chan *consensus.Output + func (t *Tetris) SendEvent(event []byte) + func (t *Tetris) SendParentEvent(event []byte) + func (t *Tetris) SendTx(hash common.Hash) + func (t *Tetris) Start() error + func (t *Tetris) Stop() error