consensus

package
v0.0.0-...-724b7ff Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MineBlock

func MineBlock(currentBlock *block.Block)

MineBlock performs the mining operation for a new block

func ValidateBlock

func ValidateBlock(currentBlock *block.Block, prevBlock *block.Block) bool

ValidateBlock validates the given block

func ValidateTransaction

func ValidateTransaction(tx transaction.Transaction) bool

Types

type AddFileTransactionValidator

type AddFileTransactionValidator struct{}

AddFileTransactionValidator for AddFileTransaction

func (*AddFileTransactionValidator) Validate

type DeleteFileTransactionValidator

type DeleteFileTransactionValidator struct{}

DeleteFileTransactionValidator for DeleteFileTransaction

func (*DeleteFileTransactionValidator) Validate

type TransactionValidator

type TransactionValidator interface {
	Validate(tx transaction.Transaction) bool
}

TransactionValidator interface

Jump to

Keyboard shortcuts

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