blockchain

package module
v0.0.0-...-000bc9a Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockchain

type Blockchain struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBlockchain

func NewBlockchain(blockGenerator spec.BlockGenerator, consensus spec.Consensus) *Blockchain

func (*Blockchain) AddBlocks

func (b *Blockchain) AddBlocks(blocks []spec.Block, local bool) *spec.AddBlocksResponse

func (*Blockchain) Consensus

func (b *Blockchain) Consensus() spec.Consensus

func (*Blockchain) GenerateBlock

func (b *Blockchain) GenerateBlock(branch []spec.Block, rootID int) spec.Block

func (*Blockchain) GenerateGenesis

func (b *Blockchain) GenerateGenesis() spec.Block

func (*Blockchain) IsRunning

func (b *Blockchain) IsRunning() bool

func (*Blockchain) Name

func (b *Blockchain) Name() string

func (*Blockchain) ReceiveTransaction

func (b *Blockchain) ReceiveTransaction(netMsg *spec.NetworkMessage) error

func (*Blockchain) Start

func (b *Blockchain) Start(ctx context.Context)

func (*Blockchain) Stop

func (b *Blockchain) Stop()

Jump to

Keyboard shortcuts

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