validation

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRewardTransaction

func NewRewardTransaction(recipientAddress string, timestamp int64, value uint64) *network.TransactionResponse

Types

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewTransactionFromRequest

func NewTransactionFromRequest(transactionRequest *network.TransactionRequest) (*Transaction, error)

func NewTransactionFromResponse

func NewTransactionFromResponse(transactionResponse *network.TransactionResponse) (transaction *Transaction, err error)

func (*Transaction) Equals

func (transaction *Transaction) Equals(other *network.TransactionResponse) bool

func (*Transaction) Fee

func (transaction *Transaction) Fee() uint64

func (*Transaction) GetResponse

func (transaction *Transaction) GetResponse() *network.TransactionResponse

func (*Transaction) IsReward

func (transaction *Transaction) IsReward() bool

func (*Transaction) MarshalJSON

func (transaction *Transaction) MarshalJSON() ([]byte, error)

func (*Transaction) RecipientAddress

func (transaction *Transaction) RecipientAddress() string

func (*Transaction) SenderAddress

func (transaction *Transaction) SenderAddress() string

func (*Transaction) Timestamp

func (transaction *Transaction) Timestamp() int64

func (*Transaction) Value

func (transaction *Transaction) Value() uint64

func (*Transaction) VerifySignature

func (transaction *Transaction) VerifySignature() error

type TransactionsPool

type TransactionsPool struct {
	// contains filtered or unexported fields
}

func NewTransactionsPool

func NewTransactionsPool(blockchain protocol.Blockchain, registry protocol.Registry, validatorAddress string, genesisAmount uint64, validationTimer time.Duration, watch clock.Watch, logger log.Logger) *TransactionsPool

func (*TransactionsPool) AddTransaction

func (pool *TransactionsPool) AddTransaction(transactionRequest *network.TransactionRequest, neighbors []network.Neighbor)

func (*TransactionsPool) Transactions

func (pool *TransactionsPool) Transactions() []*network.TransactionResponse

func (*TransactionsPool) Validate

func (pool *TransactionsPool) Validate(timestamp int64)

Jump to

Keyboard shortcuts

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