domain

package
v0.0.0-...-eb39b67 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 3 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 {
	Index        uint64
	Hash         string
	PreviousHash string
	Timestamp    int64
	Data         string
}

func (*Block) GenerateHash

func (b *Block) GenerateHash()

func (Block) String

func (b Block) String() string

type BlockChain

type BlockChain interface {
	Generate(ts int64, data string) error
	GetBlocks() []Block
	Empty() bool
	Verify() error
}

type BlockStorage

type BlockStorage interface {
	Store(b Block) error
	Load() ([]Block, error)
}

Jump to

Keyboard shortcuts

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