Documentation
¶
Index ¶
- type Blockchain
- func (b *Blockchain) AddBlocks(blocks []spec.Block, local bool) *spec.AddBlocksResponse
- func (b *Blockchain) Consensus() spec.Consensus
- func (b *Blockchain) GenerateBlock(branch []spec.Block, rootID int) spec.Block
- func (b *Blockchain) GenerateGenesis() spec.Block
- func (b *Blockchain) IsRunning() bool
- func (b *Blockchain) Name() string
- func (b *Blockchain) ReceiveTransaction(netMsg *spec.NetworkMessage) error
- func (b *Blockchain) Start(ctx context.Context)
- func (b *Blockchain) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
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 (*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()
Click to show internal directories.
Click to hide internal directories.