Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The ID of the dust collector money supply // TODO: can't be hardcoded, depends on the PDR (AB-1819) DustCollectorMoneySupplyID = append(make(types.UnitID, 32), money.BillUnitType) // Dust collector predicate DustCollectorPredicate = templates.NewP2pkh256BytesFromKey([]byte("dust collector")) )
View Source
var ( ErrBillLocked = errors.New("bill is locked") ErrTargetPartitionIDEmpty = errors.New("TargetPartitionID is empty") ErrTargetRecordIDEmpty = errors.New("TargetRecordID is empty") ErrRecordIDExists = errors.New("fee transaction cannot contain fee credit reference") ErrFeeProofExists = errors.New("fee transaction cannot contain fee authorization proof") ErrInvalidFCValue = errors.New("the amount to transfer cannot exceed the value of the bill") ErrInvalidFeeValue = errors.New("the transaction max fee cannot exceed the transferred amount") ErrInvalidCounter = errors.New("the transaction counter is not equal to the unit counter") )
Functions ¶
func NewTxSystem ¶
func NewTxSystem(shardConf *basetypes.PartitionDescriptionRecord, observe txsystem.Observability, opts ...Option) (*txsystem.GenericTxSystem, error)
Types ¶
type DustCollector ¶
type DustCollector struct {
// contains filtered or unexported fields
}
func NewDustCollector ¶
func NewDustCollector(s *state.State) *DustCollector
func (*DustCollector) AddDustBill ¶
func (d *DustCollector) AddDustBill(id types.UnitID, currentBlockNumber uint64)
func (*DustCollector) GetDustBills ¶
func (d *DustCollector) GetDustBills(blockNumber uint64) []types.UnitID
func (*DustCollector) RemoveDustBills ¶
func (d *DustCollector) RemoveDustBills(blockNumber uint64)
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func NewMoneyModule ¶
func NewMoneyModule(pdr types.PartitionDescriptionRecord, options *Options) (*Module, error)
func (*Module) BeginBlockFuncs ¶
func (*Module) EndBlockFuncs ¶
func (*Module) TxHandlers ¶ added in v1.0.0
func (m *Module) TxHandlers() map[uint16]txtypes.TxExecutor
type Option ¶
type Option func(*Options)
func WithExecutedTransactions ¶ added in v1.0.0
func WithHashAlgorithm ¶
func WithPredicateExecutor ¶ added in v0.4.0
func WithPredicateExecutor(exec predicates.PredicateExecutor) Option
WithPredicateExecutor allows to replace the default predicate executor function. Should be used by tests only.
func WithTrustBase ¶
func WithTrustBase(trust types.RootTrustBase) Option
Source Files
¶
Click to show internal directories.
Click to hide internal directories.