Documentation ¶
Index ¶
- func AddCredit(id types.UnitID, owner predicates.PredicateBytes, data *FeeCreditRecord) state.Action
- func DecrCredit(id types.UnitID, value uint64) state.Action
- func DelCredit(id types.UnitID) state.Action
- func IncrCredit(id types.UnitID, value uint64, timeout uint64, transactionRecordHash []byte) state.Action
- type FeeCreditRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCredit ¶
func AddCredit(id types.UnitID, owner predicates.PredicateBytes, data *FeeCreditRecord) state.Action
AddCredit adds a new credit record
func DecrCredit ¶
DecrCredit decrements the balance of given FeeCreditRecord
Types ¶
type FeeCreditRecord ¶
type FeeCreditRecord struct { Balance uint64 // current balance Backlink []byte // hash of the last “addFC”, "closeFC", "lockFC" or "unlockFC" transaction Timeout uint64 // the earliest round number when this record may be “garbage collected” if the balance goes to zero Locked uint64 // locked status of the fee credit record, non-zero value means locked // contains filtered or unexported fields }
FeeCreditRecord state tree unit data of fee credit records. Holds fee credit balance for individual users, not to be confused with fee credit bills which contain aggregate fees for a given partition.
func (*FeeCreditRecord) Copy ¶
func (b *FeeCreditRecord) Copy() state.UnitData
func (*FeeCreditRecord) GetBacklink ¶
func (b *FeeCreditRecord) GetBacklink() []byte
func (*FeeCreditRecord) IsLocked ¶
func (b *FeeCreditRecord) IsLocked() bool
func (*FeeCreditRecord) SummaryValueInput ¶
func (b *FeeCreditRecord) SummaryValueInput() uint64
Click to show internal directories.
Click to hide internal directories.