BLC

package
v0.0.0-...-afd30a4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64ToBytes

func Int64ToBytes(num int64) []byte

Types

type Block

type Block struct {
	// 区块高度
	Height int64
	// 当前区块 HASH 值
	Hash []byte
	// 上一个区块的 HASH 值
	PrevBlockHash []byte
	// 交易数据
	Data []byte
	// 时间戳
	Timestamp int64
}

func NewBlock

func NewBlock(data string, height int64, prevBlockHash []byte) *Block

NewBlock 创建新的区块

func (*Block) SetHash

func (block *Block) SetHash()

Jump to

Keyboard shortcuts

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