block

package
v0.0.0-...-e5e0bb6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashBlock

func HashBlock(block *proto.Block) []byte

sha256

func SignBlock

func SignBlock(pk *crypto.PrivateKey, block *proto.Block) *crypto.Signature

Types

type Block

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

func NewBlock

func NewBlock(transactions []*proto.Transaction, prevHash []byte, height int) *Block

func (*Block) AddBlock

func (b *Block) AddBlock(p *proto.Block) error

func (*Block) Get

func (b *Block) Get(bytes []byte) (*proto.Block, error)

func (*Block) GetBlock

func (b *Block) GetBlock() *proto.Block

func (*Block) GetBlockByHash

func (b *Block) GetBlockByHash(hash []byte) (*proto.Block, error)

func (*Block) GetBlockByHeight

func (b *Block) GetBlockByHeight(height int) (*proto.Block, error)

Jump to

Keyboard shortcuts

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