datalib

package
v0.0.0-...-910d698 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcQueue

type BcQueue struct {
	// contains filtered or unexported fields
}

func NewBcQueue

func NewBcQueue(capacity int) *BcQueue

func (*BcQueue) Find

func (q *BcQueue) Find(item interface{}) bool

func (*BcQueue) Pop

func (q *BcQueue) Pop() (interface{}, error)

func (*BcQueue) Push

func (q *BcQueue) Push(item interface{})

func (*BcQueue) ShowAll

func (q *BcQueue) ShowAll()

type CandidateBlocks

type CandidateBlocks struct {
	// contains filtered or unexported fields
}

func NewCandidateBlocks

func NewCandidateBlocks() *CandidateBlocks

func (*CandidateBlocks) CheckFinality

func (q *CandidateBlocks) CheckFinality()

This is to check whether Finality is long enough. If finality is short, panic will happen.

func (*CandidateBlocks) GetHighestBlockHash

func (q *CandidateBlocks) GetHighestBlockHash() (int, string)

func (*CandidateBlocks) PushAndSave

func (q *CandidateBlocks) PushAndSave(block *blockchain.Block, sb SaveBlock) bool

func (*CandidateBlocks) ShowAll

func (q *CandidateBlocks) ShowAll()

type SaveBlock

type SaveBlock interface {
	AddBlock(b *blockchain.Block) int64
}

Jump to

Keyboard shortcuts

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