Documentation ¶
Index ¶
- Variables
- type AddFCValidationContext
- type CloseFCValidationContext
- type DefaultFeeCreditTxValidator
- func (v *DefaultFeeCreditTxValidator) ValidateAddFeeCredit(ctx *AddFCValidationContext) error
- func (v *DefaultFeeCreditTxValidator) ValidateCloseFC(ctx *CloseFCValidationContext) error
- func (v *DefaultFeeCreditTxValidator) ValidateLockFC(ctx *LockFCValidationContext) error
- func (v *DefaultFeeCreditTxValidator) ValidateUnlockFC(ctx *UnlockFCValidationContext) error
- type FeeCalculator
- type FeeCredit
- type LockFCValidationContext
- type Option
- func WithFeeCalculator(feeCalculator FeeCalculator) Option
- func WithFeeCreditRecordUnitType(feeCreditRecordUnitType []byte) Option
- func WithHashAlgorithm(hashAlgorithm crypto.Hash) Option
- func WithMoneySystemIdentifier(moneySystemID types.SystemID) Option
- func WithState(s *state.State) Option
- func WithSystemIdentifier(systemID types.SystemID) Option
- func WithTrustBase(trustBase map[string]abcrypto.Verifier) Option
- type UnlockFCValidationContext
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AddFCValidationContext ¶
type AddFCValidationContext struct { Tx *types.TransactionOrder Unit *state.Unit CurrentRoundNumber uint64 }
type CloseFCValidationContext ¶
type CloseFCValidationContext struct { Tx *types.TransactionOrder Unit *state.Unit }
type DefaultFeeCreditTxValidator ¶
type DefaultFeeCreditTxValidator struct {
// contains filtered or unexported fields
}
DefaultFeeCreditTxValidator default validator for partition specific add/close/lock/unlock fee credit transactions
func (*DefaultFeeCreditTxValidator) ValidateAddFeeCredit ¶
func (v *DefaultFeeCreditTxValidator) ValidateAddFeeCredit(ctx *AddFCValidationContext) error
func (*DefaultFeeCreditTxValidator) ValidateCloseFC ¶
func (v *DefaultFeeCreditTxValidator) ValidateCloseFC(ctx *CloseFCValidationContext) error
func (*DefaultFeeCreditTxValidator) ValidateLockFC ¶
func (v *DefaultFeeCreditTxValidator) ValidateLockFC(ctx *LockFCValidationContext) error
func (*DefaultFeeCreditTxValidator) ValidateUnlockFC ¶
func (v *DefaultFeeCreditTxValidator) ValidateUnlockFC(ctx *UnlockFCValidationContext) error
type FeeCalculator ¶
type FeeCalculator func() uint64
func FixedFee ¶
func FixedFee(fee uint64) FeeCalculator
type FeeCredit ¶
type FeeCredit struct {
// contains filtered or unexported fields
}
FeeCredit contains fee credit related functionality.
func NewFeeCreditModule ¶
func (*FeeCredit) CheckFeeCreditBalance ¶
func (f *FeeCredit) CheckFeeCreditBalance(tx *types.TransactionOrder) error
CheckFeeCreditBalance implements the fee credit verification steps listed in the Yellowpaper "Valid Transaction Orders" chapter.
func (*FeeCredit) TxExecutors ¶
func (f *FeeCredit) TxExecutors() map[string]txsystem.ExecuteFunc
type LockFCValidationContext ¶
type LockFCValidationContext struct { Tx *types.TransactionOrder Attr *transactions.LockFeeCreditAttributes Unit *state.Unit }
type Option ¶
type Option func(f *FeeCredit)
func WithFeeCalculator ¶
func WithFeeCalculator(feeCalculator FeeCalculator) Option
func WithHashAlgorithm ¶
func WithSystemIdentifier ¶
type UnlockFCValidationContext ¶
type UnlockFCValidationContext struct { Tx *types.TransactionOrder Attr *transactions.UnlockFeeCreditAttributes Unit *state.Unit }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.