blockchain

package
v0.0.0-...-9851e94 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Hash    []byte
	C_Id    []byte
	Ip_Port []byte
	OldHash []byte
}

func CreateBlock

func CreateBlock(cId string, ip_port string, oldHash []byte) *Block

func Origin

func Origin() *Block

func (*Block) DeriveHash

func (b *Block) DeriveHash()

type BlockChain

type BlockChain struct {
	Blocks []*Block
}

func InitBlockChain

func InitBlockChain() *BlockChain

func (*BlockChain) AddBlock

func (chain *BlockChain) AddBlock(cId string, ip_port string)

Jump to

Keyboard shortcuts

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