validation

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCommon added in v0.0.29

func CheckCommon(tx types.BaseTx, index int) error

func CheckNamespaceDomains

func CheckNamespaceDomains(domains map[string]string, index int) error

CheckNamespaceDomains checks namespace domains and targets

func CheckProposalCommonConsistency

func CheckProposalCommonConsistency(
	prop *txns.TxProposalCommon,
	txCommon *txns.TxCommon,
	index int,
	logic core.Logic) (*state.Repository, error)

CheckProposalCommonConsistency includes common consistency checks for proposal transactions.

func CheckProposalID

func CheckProposalID(id string, allowPrefix bool, index int) error

CheckProposalID performs sanity checks of a proposal id

func CheckRecipient

func CheckRecipient(tx *txns.TxRecipient, index int) error

CheckRecipient validates the recipient address

func CheckRepoConfig

func CheckRepoConfig(cfg *state.RepoConfig, index int) error

CheckRepoConfig validates a repo configuration object

func CheckScopes

func CheckScopes(scopes []string, index int) error

CheckScopes checks a list of strings intended to be used as push key scopes.

func CheckTxCoinTransfer

func CheckTxCoinTransfer(tx *txns.TxCoinTransfer, index int) error

CheckTxCoinTransfer performs sanity checks on TxCoinTransfer

func CheckTxCoinTransferConsistency

func CheckTxCoinTransferConsistency(
	tx *txns.TxCoinTransfer,
	index int,
	logic core.Logic) error

CheckTxCoinTransferConsistency performs consistency checks on TxCoinTransfer

func CheckTxNSAcquireConsistency

func CheckTxNSAcquireConsistency(tx *txns.TxNamespaceRegister, index int, logic core.Logic) error

CheckTxNSAcquireConsistency performs consistency checks on TxNamespaceRegister

func CheckTxNamespaceAcquire

func CheckTxNamespaceAcquire(tx *txns.TxNamespaceRegister, index int) error

CheckTxNamespaceAcquire performs sanity checks on TxNamespaceRegister

func CheckTxNamespaceDomainUpdate

func CheckTxNamespaceDomainUpdate(tx *txns.TxNamespaceDomainUpdate, index int) error

CheckTxNamespaceDomainUpdate performs sanity checks on TxNamespaceDomainUpdate

func CheckTxNamespaceDomainUpdateConsistency

func CheckTxNamespaceDomainUpdateConsistency(tx *txns.TxNamespaceDomainUpdate, index int, logic core.Logic) error

CheckTxNamespaceDomainUpdateConsistency performs consistency checks on TxNamespaceDomainUpdate

func CheckTxPush

func CheckTxPush(tx *txns.TxPush, index int) error

CheckTxPush performs sanity checks on TxPush

func CheckTxPushConsistency

func CheckTxPushConsistency(tx *txns.TxPush, _ int, logic core.Logic) error

CheckTxPushConsistency performs consistency checks on TxPush. EXPECTS: sanity check using CheckTxPush to have been performed.

func CheckTxRegisterPushKey

func CheckTxRegisterPushKey(tx *txns.TxRegisterPushKey, index int) error

CheckTxRegisterPushKey performs sanity checks on TxRegisterPushKey

func CheckTxRegisterPushKeyConsistency

func CheckTxRegisterPushKeyConsistency(
	tx *txns.TxRegisterPushKey,
	index int,
	logic core.Logic) error

CheckTxRegisterPushKeyConsistency performs consistency checks on TxRegisterPushKey

func CheckTxRepoCreate

func CheckTxRepoCreate(tx *txns.TxRepoCreate, index int) error

CheckTxRepoCreate performs sanity checks on TxRepoCreate

func CheckTxRepoCreateConsistency

func CheckTxRepoCreateConsistency(tx *txns.TxRepoCreate, index int, logic core.Logic) error

CheckTxRepoCreateConsistency performs consistency checks on TxRepoCreate

func CheckTxRepoProposalRegisterPushKey

func CheckTxRepoProposalRegisterPushKey(tx *txns.TxRepoProposalRegisterPushKey, index int) error

CheckTxRepoProposalRegisterPushKey performs sanity checks on TxRepoProposalRegisterPushKey

func CheckTxRepoProposalRegisterPushKeyConsistency

func CheckTxRepoProposalRegisterPushKeyConsistency(
	tx *txns.TxRepoProposalRegisterPushKey,
	index int,
	logic core.Logic) error

CheckTxRepoProposalRegisterPushKeyConsistency performs consistency checks on TxRepoProposalRegisterPushKey

func CheckTxRepoProposalSendFee

func CheckTxRepoProposalSendFee(tx *txns.TxRepoProposalSendFee, index int) error

CheckTxRepoProposalSendFee performs sanity checks on TxRepoProposalSendFee

func CheckTxRepoProposalSendFeeConsistency

func CheckTxRepoProposalSendFeeConsistency(
	tx *txns.TxRepoProposalSendFee,
	index int,
	logic core.Logic) error

CheckTxRepoProposalSendFeeConsistency performs consistency checks on TxRepoProposalSendFee

func CheckTxRepoProposalUpdate

func CheckTxRepoProposalUpdate(tx *txns.TxRepoProposalUpdate, index int) error

CheckTxRepoProposalUpdate performs sanity checks on TxRepoProposalUpdate

func CheckTxRepoProposalUpdateConsistency

func CheckTxRepoProposalUpdateConsistency(tx *txns.TxRepoProposalUpdate, index int, logic core.Logic) error

CheckTxRepoProposalUpdateConsistency performs consistency checks on CheckTxRepoProposalUpdate

func CheckTxRepoProposalUpsertOwner

func CheckTxRepoProposalUpsertOwner(tx *txns.TxRepoProposalUpsertOwner, index int) error

CheckTxRepoProposalUpsertOwner performs sanity checks on TxRepoProposalUpsertOwner

func CheckTxRepoProposalUpsertOwnerConsistency

func CheckTxRepoProposalUpsertOwnerConsistency(
	tx *txns.TxRepoProposalUpsertOwner,
	index int,
	logic core.Logic) error

CheckTxRepoProposalUpsertOwnerConsistency performs consistency checks on CheckTxRepoProposalUpsertOwner

func CheckTxSetDelegateCommission

func CheckTxSetDelegateCommission(tx *txns.TxSetDelegateCommission, index int) error

CheckTxSetDelegateCommission performs sanity checks on TxSetDelegateCommission

func CheckTxSetDelegateCommissionConsistency

func CheckTxSetDelegateCommissionConsistency(tx *txns.TxSetDelegateCommission, _ int, logic core.Logic) error

CheckTxSetDelegateCommissionConsistency performs consistency checks on TxSetDelegateCommission

func CheckTxTicketPurchase

func CheckTxTicketPurchase(tx *txns.TxTicketPurchase, index int) error

CheckTxTicketPurchase performs sanity checks on TxTicketPurchase

func CheckTxTicketPurchaseConsistency

func CheckTxTicketPurchaseConsistency(
	tx *txns.TxTicketPurchase,
	index int,
	logic core.Logic) error

CheckTxTicketPurchaseConsistency performs consistency checks on TxTicketPurchase

func CheckTxUnbondTicket

func CheckTxUnbondTicket(tx *txns.TxTicketUnbond, index int) error

CheckTxUnbondTicket performs sanity checks on TxTicketUnbond

func CheckTxUnbondTicketConsistency

func CheckTxUnbondTicketConsistency(
	tx *txns.TxTicketUnbond,
	index int,
	logic core.Logic) error

CheckTxUnbondTicketConsistency performs consistency checks on TxTicketUnbond

func CheckTxUpDelPushKey

func CheckTxUpDelPushKey(tx *txns.TxUpDelPushKey, index int) error

CheckTxUpDelPushKey performs sanity checks on TxRegisterPushKey

func CheckTxUpDelPushKeyConsistency

func CheckTxUpDelPushKeyConsistency(
	tx *txns.TxUpDelPushKey,
	index int,
	logic core.Logic) error

CheckTxUpDelPushKeyConsistency CheckTxRegisterPushKeyConsistency performs consistency checks on TxUpDelPushKey

func CheckTxVote

func CheckTxVote(tx *txns.TxRepoProposalVote, index int) error

CheckTxVote performs sanity checks on TxRepoProposalVote

func CheckTxVoteConsistency

func CheckTxVoteConsistency(
	tx *txns.TxRepoProposalVote,
	index int,
	logic core.Logic) error

CheckTxVoteConsistency performs consistency checks on CheckTxVote

func ValidateTx

func ValidateTx(tx types.BaseTx, i int, logic core.Logic) error

ValidateTx validates a transaction

func ValidateTxConsistency

func ValidateTxConsistency(tx types.BaseTx, index int, logic core.Logic) error

ValidateTxConsistency checks whether the transaction includes values that are consistent with the current state of the app

CONTRACT: Sender public key must be validated by the caller.

func ValidateTxSanity

func ValidateTxSanity(tx types.BaseTx, index int) error

ValidateTxSanity checks whether the transaction's fields and values are correct without checking any storage.

index: index is used to indicate the index of the transaction in a slice managed by the caller. It is used for constructing error messages. Use -1 if tx is not part of a collection.

Types

type ValidateTxFunc

type ValidateTxFunc func(tx types.BaseTx, i int, logic core.Logic) error

ValidateTxFunc represents a function for validating a transaction

Jump to

Keyboard shortcuts

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