Documentation ¶
Index ¶
- func MineBlock(currentBlock *block.Block, stop chan StopMiningSignal) (bool, *block.Block)
- func ValidateBlock(currentBlock *block.Block, prevBlock *block.Block) bool
- func ValidateTransaction(tx transaction.Transaction) bool
- type AddFileTransactionValidator
- type DeleteFileTransactionValidator
- type StopMiningSignal
- type TransactionValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBlock ¶
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 ¶
func (v *AddFileTransactionValidator) Validate(tx transaction.Transaction) bool
type DeleteFileTransactionValidator ¶
type DeleteFileTransactionValidator struct{}
DeleteFileTransactionValidator for DeleteFileTransaction
func (*DeleteFileTransactionValidator) Validate ¶
func (v *DeleteFileTransactionValidator) Validate(tx transaction.Transaction) bool
type StopMiningSignal ¶
type TransactionValidator ¶
type TransactionValidator interface {
Validate(tx transaction.Transaction) bool
}
TransactionValidator interface
Click to show internal directories.
Click to hide internal directories.