block

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Header BlockHeader
	Vtx    []transaction.Transaction
}

func (Block) Pack

func (b Block) Pack(writer io.Writer) error

func (Block) PackToHex

func (b Block) PackToHex() (string, error)

func (*Block) UnPack

func (b *Block) UnPack(reader io.Reader) error

func (*Block) UnPackFromHex

func (b *Block) UnPackFromHex(hexStr string) error

type BlockHeader

type BlockHeader struct {
	Version        int32
	HashPrevBlock  bigint.Uint256
	HashMerkleRoot bigint.Uint256
	Time           uint32
	Bits           uint32
	Nonce          uint32
}

func (BlockHeader) Pack

func (b BlockHeader) Pack(writer io.Writer) error

func (*BlockHeader) UnPack

func (b *BlockHeader) UnPack(reader io.Reader) error

Jump to

Keyboard shortcuts

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